xwayland: Propagate error if display sockets failed

In case of failure to open the display sockets, we would not propagatre
the error which can cause a crash when trying to show the error message.

Properly propagate the error to avoid the crash.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1669>
This commit is contained in:
Olivier Fourdan 2021-01-13 18:25:06 +01:00
parent 063db30c50
commit 1bd42e8779

View File

@ -711,7 +711,8 @@ choose_xdisplay (MetaXWaylandManager *manager,
}
else
{
g_warning ("Failed to bind X11 socket");
g_prefix_error (&local_error, "Failed to bind X11 socket: ");
g_propagate_error (error, g_steal_pointer (&local_error));
return FALSE;
}
}