summaryrefslogtreecommitdiff
path: root/gdk/x11/gdkpango-x11.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdk/x11/gdkpango-x11.c')
-rw-r--r--gdk/x11/gdkpango-x11.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdk/x11/gdkpango-x11.c b/gdk/x11/gdkpango-x11.c
index 6432e99fc..bcc43e08d 100644
--- a/gdk/x11/gdkpango-x11.c
+++ b/gdk/x11/gdkpango-x11.c
@@ -49,6 +49,9 @@ gdk_pango_context_get_for_screen (GdkScreen *screen)
GdkDisplayX11 *display_x11;
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
+
+ if (screen->closed)
+ return NULL;
display_x11 = GDK_DISPLAY_X11 (GDK_SCREEN_DISPLAY (screen));