Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/nfd
diff options
context:
space:
mode:
authorBartosz Taudul <wolf.pld@gmail.com>2019-06-23 01:36:25 +0300
committerBartosz Taudul <wolf.pld@gmail.com>2019-06-23 01:36:25 +0300
commit9375afdbed22fc45b4a1af0f190ece588b1e1f9e (patch)
tree5e3ae8a9d3fbbb41c757cd51ac6d2ccac1d69d7f /nfd
parent6bdfedead257d6c448dc11eed7c939809cae5d71 (diff)
All variables must be defined before goto.
Diffstat (limited to 'nfd')
-rw-r--r--nfd/nfd_win.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/nfd/nfd_win.cpp b/nfd/nfd_win.cpp
index f4c5e7a7..d57065d4 100644
--- a/nfd/nfd_win.cpp
+++ b/nfd/nfd_win.cpp
@@ -366,6 +366,7 @@ nfdresult_t NFD_OpenDialog( const nfdchar_t *filterList,
const nfdchar_t *defaultPath,
nfdchar_t **outPath )
{
+ HRESULT result;
nfdresult_t nfdResult = NFD_ERROR;
// Init COM library.
@@ -383,7 +384,7 @@ nfdresult_t NFD_OpenDialog( const nfdchar_t *filterList,
}
// Create dialog
- HRESULT result = ::CoCreateInstance(::CLSID_FileOpenDialog, NULL,
+ result = ::CoCreateInstance(::CLSID_FileOpenDialog, NULL,
CLSCTX_ALL, ::IID_IFileOpenDialog,
reinterpret_cast<void**>(&fileOpenDialog) );