summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'facetracknoir/main.cpp')
-rw-r--r--facetracknoir/main.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/facetracknoir/main.cpp b/facetracknoir/main.cpp
index 326b40ec..7ba0a462 100644
--- a/facetracknoir/main.cpp
+++ b/facetracknoir/main.cpp
@@ -17,18 +17,14 @@ using namespace options;
// workaround QTBUG-38598, allow for launching from another directory
static void add_program_library_path()
{
+ char* p = _pgmptr;
+ char path[MAX_PATH+1];
+ strcpy(path, p);
+ char* ptr = strrchr(path, '\\');
+ if (ptr)
{
- char* p = _pgmptr;
- {
- char path[MAX_PATH+1];
- strcpy(path, p);
- char* ptr = strrchr(path, '\\');
- if (ptr)
- {
- *ptr = '\0';
- QCoreApplication::addLibraryPath(path);
- }
- }
+ *ptr = '\0';
+ QCoreApplication::addLibraryPath(path);
}
}
#endif