diff --git a/src/core/display.c b/src/core/display.c index f32ec62bd..c84673bdc 100644 --- a/src/core/display.c +++ b/src/core/display.c @@ -1007,6 +1007,7 @@ meta_display_close (MetaDisplay *display, meta_compositor_destroy (display->compositor); g_object_unref (display); + the_display = NULL; meta_quit (META_EXIT_SUCCESS); } diff --git a/src/core/main.c b/src/core/main.c index c074b74ec..7aa62c95f 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -427,8 +427,11 @@ meta_select_display (gchar *display_name) static void meta_finalize (void) { - meta_display_close (meta_get_display (), - CurrentTime); /* I doubt correct timestamps matter here */ + MetaDisplay *display = meta_get_display (); + + if (display) + meta_display_close (display, + CurrentTime); /* I doubt correct timestamps matter here */ meta_session_shutdown (); }