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



commit 7503d4812caf2e6ef772bd13c29ca5c1fd122ad4
Author: Dan Winship <danw gnome org>
Date:   Tue Mar 29 15:16:23 2011 -0400

    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 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index 016c48c..edb6149 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");
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]