From f7aa5f865307cc5addb5743ab1a25732170c8290 Mon Sep 17 00:00:00 2001 From: Tomas Frydrych Date: Tue, 3 Feb 2009 13:16:01 +0000 Subject: [PATCH] Ensure that we do not attempt to free the tab popup when there is none. --- src/core/display.c | 7 +++++-- src/ui/tabpopup.c | 6 ++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/core/display.c b/src/core/display.c index 68b0a66eb..3da9651da 100644 --- a/src/core/display.c +++ b/src/core/display.c @@ -3568,8 +3568,11 @@ meta_display_end_grab_op (MetaDisplay *display, if (GRAB_OP_IS_WINDOW_SWITCH (display->grab_op) || display->grab_op == META_GRAB_OP_KEYBOARD_WORKSPACE_SWITCHING) { - meta_ui_tab_popup_free (display->grab_screen->tab_popup); - display->grab_screen->tab_popup = NULL; + if (display->grab_screen->tab_popup) + { + meta_ui_tab_popup_free (display->grab_screen->tab_popup); + display->grab_screen->tab_popup = NULL; + } /* If the ungrab here causes an EnterNotify, ignore it for * sloppy focus diff --git a/src/ui/tabpopup.c b/src/ui/tabpopup.c index a006d9272..d79dbee5d 100644 --- a/src/ui/tabpopup.c +++ b/src/ui/tabpopup.c @@ -422,6 +422,12 @@ void meta_ui_tab_popup_free (MetaTabPopup *popup) { meta_verbose ("Destroying tab popup window\n"); + + if (!popup) + { + meta_warning ("NULL passed to meta_ui_tab_popup_free\n"); + return; + } if (popup->outline) {