summaryrefslogtreecommitdiff
path: root/mozilla-1431052.patch
blob: 59376bd1b4cca5fbbd7c0a7c00d08feee5f53ae8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -6948,11 +6948,15 @@ nsWindow::GetWaylandDisplay()
   GdkDisplay* gdkDisplay = gdk_display_get_default();
   return mIsX11Display ? nullptr :
                          sGdkWaylandDisplayGetWlDisplay(gdkDisplay);
 }
 
 wl_surface*
 nsWindow::GetWaylandSurface()
 {
-  return moz_container_get_wl_surface(MOZ_CONTAINER(mContainer));
+  if (mContainer)
+    return moz_container_get_wl_surface(MOZ_CONTAINER(mContainer));
+
+  NS_WARNING("nsWindow::GetWaylandSurfaces(): We don't have any mContainer for drawing!");
+  return nullptr;
 }
 #endif

bgstack15