diff options
Diffstat (limited to 'alc/helpers.cpp')
-rw-r--r-- | alc/helpers.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/alc/helpers.cpp b/alc/helpers.cpp index ce407756..1003ccfa 100644 --- a/alc/helpers.cpp +++ b/alc/helpers.cpp @@ -267,10 +267,11 @@ const PathNamePair &GetProcBinary() } #endif #ifdef __HAIKU__ - char procpath[PATH_MAX]; - if(find_path(B_APP_IMAGE_SYMBOL, B_FIND_PATH_IMAGE_PATH, NULL, procpath, sizeof(procpath)) == B_OK) + if(pathname.empty()) { - pathname.insert(pathname.end(), procpath, procpath+strlen(procpath)); + char procpath[PATH_MAX]; + if(find_path(B_APP_IMAGE_SYMBOL, B_FIND_PATH_IMAGE_PATH, NULL, procpath, sizeof(procpath)) == B_OK) + pathname.insert(pathname.end(), procpath, procpath+strlen(procpath)); } #endif if(pathname.empty()) |