wayland: fix filechooser crash

The opaque region of the window can be updated before we're requested
its creation on the compositor.

https://bugzilla.gnome.org/show_bug.cgi?id=786673
This commit is contained in:
Lionel Landwerlin 2017-08-23 15:22:47 +01:00 committed by Matthias Clasen
parent 4402335333
commit bd033165e5

View File

@ -1177,7 +1177,8 @@ gdk_wayland_window_sync_opaque_region (GdkWindow *window)
wl_region = wl_region_from_cairo_region (GDK_WAYLAND_DISPLAY (gdk_window_get_display (window)),
impl->opaque_region);
wl_surface_set_opaque_region (impl->display_server.wl_surface, wl_region);
if (impl->display_server.wl_surface)
wl_surface_set_opaque_region (impl->display_server.wl_surface, wl_region);
if (wl_region != NULL)
wl_region_destroy (wl_region);