[mutter] xwayland: Propagate error if display sockets failed



commit 1bd42e8779bbdcb5100d69f90309f48dfe3794cd
Author: Olivier Fourdan <ofourdan redhat com>
Date:   Wed Jan 13 18:25:06 2021 +0100

    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>

 src/wayland/meta-xwayland.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c
index 1343a7d057..56a50b1347 100644
--- a/src/wayland/meta-xwayland.c
+++ b/src/wayland/meta-xwayland.c
@@ -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;
             }
         }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]