window: don't crash on spurious calls to idle_calc_showing()

If idle_calc_showing() gets called when its queue is empty (which
shouldn't happen), just return rather than crashing.

https://bugzilla.gnome.org/show_bug.cgi?id=642957
This commit is contained in:
Dan Winship 2011-03-29 15:16:23 -04:00
parent 1fd8b0b4c5
commit 7503d4812c

View File

@ -2041,6 +2041,8 @@ idle_calc_showing (gpointer data)
MetaWindow *first_window;
guint queue_index = GPOINTER_TO_INT (data);
g_return_val_if_fail (queue_pending[queue_index] != NULL, FALSE);
meta_topic (META_DEBUG_WINDOW_STATE,
"Clearing the calc_showing queue\n");