Ensure that we do not attempt to free the tab popup when there is none.

This commit is contained in:
Tomas Frydrych 2009-02-03 13:16:01 +00:00
parent 6da5a5abcb
commit f7aa5f8653
2 changed files with 11 additions and 2 deletions

View File

@ -3568,8 +3568,11 @@ meta_display_end_grab_op (MetaDisplay *display,
if (GRAB_OP_IS_WINDOW_SWITCH (display->grab_op) || if (GRAB_OP_IS_WINDOW_SWITCH (display->grab_op) ||
display->grab_op == META_GRAB_OP_KEYBOARD_WORKSPACE_SWITCHING) display->grab_op == META_GRAB_OP_KEYBOARD_WORKSPACE_SWITCHING)
{ {
meta_ui_tab_popup_free (display->grab_screen->tab_popup); if (display->grab_screen->tab_popup)
display->grab_screen->tab_popup = NULL; {
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 /* If the ungrab here causes an EnterNotify, ignore it for
* sloppy focus * sloppy focus

View File

@ -422,6 +422,12 @@ void
meta_ui_tab_popup_free (MetaTabPopup *popup) meta_ui_tab_popup_free (MetaTabPopup *popup)
{ {
meta_verbose ("Destroying tab popup window\n"); meta_verbose ("Destroying tab popup window\n");
if (!popup)
{
meta_warning ("NULL passed to meta_ui_tab_popup_free\n");
return;
}
if (popup->outline) if (popup->outline)
{ {