[gtk/mcatanzaro/#1349] wayland: Fix a very-frequent crasher
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/mcatanzaro/#1349] wayland: Fix a very-frequent crasher
- Date: Sat, 22 Sep 2018 01:39:55 +0000 (UTC)
commit b9ccd39e24a49e180d38f678a63af4d9548dac4d
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Fri Sep 21 20:37:17 2018 -0500
wayland: Fix a very-frequent crasher
This is probably a bandaid rather than a real fix. For some reason,
impl->display_server.wl_surface is NULL here, and we crash in that
case, so let's not do that. Requires further investigation.
Fixes #1349
gdk/wayland/gdkwindow-wayland.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index 5f162770a0..58bd2744aa 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -766,6 +766,10 @@ gdk_wayland_window_attach_image (GdkWindow *window)
g_assert (_gdk_wayland_is_shm_surface (impl->staging_cairo_surface));
+ /* XXX: Is this correct? */
+ if (!impl->display_server.wl_surface)
+ return;
+
/* Attach this new buffer to the surface */
wl_surface_attach (impl->display_server.wl_surface,
_gdk_wayland_shm_surface_get_wl_buffer (impl->staging_cairo_surface),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]