diff --git a/src/core/display.c b/src/core/display.c index 395b541bb..fb4b127f5 100644 --- a/src/core/display.c +++ b/src/core/display.c @@ -975,8 +975,7 @@ meta_display_close (MetaDisplay *display, /* Stop caring about events */ meta_display_free_events (display); - if (display->compositor) - meta_compositor_destroy (display->compositor); + g_clear_pointer (&display->compositor, meta_compositor_destroy); meta_display_shutdown_x11 (display);