Fixed: openURL crash under linux
--HG-- branch : develop
This commit is contained in:
parent
6a6ce67a58
commit
5b4b7893f8
1 changed files with 2 additions and 2 deletions
|
@ -1720,12 +1720,12 @@ static bool openDocWithExtension (const std::string &document, const std::string
|
||||||
const char *previousEnv = getenv("LD_LIBRARY_PATH");
|
const char *previousEnv = getenv("LD_LIBRARY_PATH");
|
||||||
|
|
||||||
// clear LD_LIBRARY_PATH to avoid problems with Steam Runtime
|
// clear LD_LIBRARY_PATH to avoid problems with Steam Runtime
|
||||||
setenv("LD_LIBRARY_PATH", "", 1);
|
if (previousEnv) setenv("LD_LIBRARY_PATH", "", 1);
|
||||||
|
|
||||||
bool res = launchProgram(command, document);
|
bool res = launchProgram(command, document);
|
||||||
|
|
||||||
// restore previous LD_LIBRARY_PATH
|
// restore previous LD_LIBRARY_PATH
|
||||||
setenv("LD_LIBRARY_PATH", previousEnv, 1);
|
if (previousEnv) setenv("LD_LIBRARY_PATH", previousEnv, 1);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
#endif // NL_OS_WINDOWS
|
#endif // NL_OS_WINDOWS
|
||||||
|
|
Loading…
Reference in a new issue