mirror of
https://github.com/brl/mutter.git
synced 2024-12-24 20:12:06 +00:00
x11-display: Use unsetenv if old value was NULL
Gets rid of a CRITICAL if NO_AT_BRIDGE was not set before. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1749>
This commit is contained in:
parent
2a71ca373b
commit
861d03aac0
@ -1086,7 +1086,11 @@ meta_x11_init_gdk_display (GError **error)
|
||||
old_no_at_bridge = g_getenv ("NO_AT_BRIDGE");
|
||||
g_setenv ("NO_AT_BRIDGE", "1", TRUE);
|
||||
gdk_display = gdk_display_open (xdisplay_name);
|
||||
g_setenv ("NO_AT_BRIDGE", old_no_at_bridge, TRUE);
|
||||
|
||||
if (old_no_at_bridge)
|
||||
g_setenv ("NO_AT_BRIDGE", old_no_at_bridge, TRUE);
|
||||
else
|
||||
g_unsetenv ("NO_AT_BRIDGE");
|
||||
|
||||
if (!gdk_display)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user