aboutsummaryrefslogtreecommitdiffstats
path: root/alc/helpers.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-10-13 01:57:53 -0700
committerChris Robinson <[email protected]>2020-10-13 01:57:53 -0700
commitb0e025946e9e7dd7638b9ebb7279ca7a3e26b742 (patch)
tree488023525bff23fcbd3de8bb2a50b3035793ade0 /alc/helpers.cpp
parent303ca3af72aa7aecc25d94690f3886085c5c6e5b (diff)
Don't check for the app path if one was already retrieved
Diffstat (limited to 'alc/helpers.cpp')
-rw-r--r--alc/helpers.cpp7
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())