From 7503d4812caf2e6ef772bd13c29ca5c1fd122ad4 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Tue, 29 Mar 2011 15:16:23 -0400 Subject: [PATCH] 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 --- src/core/window.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/window.c b/src/core/window.c index 016c48ceb..edb61494e 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -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");