Commit d4b2d296 authored by Christian Hergert's avatar Christian Hergert
Browse files

launcher: use NULL to specify g_environ_unsetenv()

This is useful to clear existing values.
parent 10f73d53
......@@ -663,7 +663,10 @@ ide_subprocess_launcher_setenv (IdeSubprocessLauncher *self,
g_return_if_fail (IDE_IS_SUBPROCESS_LAUNCHER (self));
g_return_if_fail (key != NULL);
priv->environ = g_environ_setenv (priv->environ, key, value, replace);
if (value != NULL)
priv->environ = g_environ_setenv (priv->environ, key, value, replace);
else
priv->environ = g_environ_unsetenv (priv->environ, key);
}
void
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment