@@ -92,7 +92,7 @@ static void add_path(const char* name, const char* rootdir) {
9292}
9393
9494#define SAVE_ENV_VAR(x) char *x = getenv(#x)
95−#define LOAD_ENV_VAR(x) setenv(#x, x, 1)
95+#define LOAD_ENV_VAR(x) do { if (x != NULL) setenv(#x, x, 1); } while(0)
9696
9797int main(int argc, char *argv[]) {
9898 char *appdir = dirname(realpath("/proc/self/exe", NULL));