15 lines
601 B
Diff
15 lines
601 B
Diff
|
--- a/src/hugin_base/hugin_utils/utils.cpp 2022-12-05 22:19:26.873574924 -0800
|
||
|
+++ b/src/hugin_base/hugin_utils/utils.cpp 2022-12-05 22:19:09.069575641 -0800
|
||
|
@@ -472,9 +472,9 @@
|
||
|
#else
|
||
|
#ifdef USE_XDG_DIRS
|
||
|
char *xdgDataDir = getenv("XDG_DATA_HOME");
|
||
|
- if (strlen(xdgDataDir) == 0)
|
||
|
+ if (xdgDataDir == NULL || strlen(xdgDataDir) == 0)
|
||
|
{
|
||
|
- // no XDG_DATA_HOME enviroment variable set
|
||
|
+ // no XDG_DATA_HOME enviroment variable set or empty variable
|
||
|
// use $HOME/.local/share instead
|
||
|
const std::string homeDir = GetHomeDir();
|
||
|
if (homeDir.empty())
|