stage: Protect call to unrealize() in dispose
authorEmmanuele Bassi <ebassi@linux.intel.com>
Fri, 9 Sep 2011 12:53:33 +0000 (13:53 +0100)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Fri, 9 Sep 2011 12:53:33 +0000 (13:53 +0100)
Do not call ClutterStageWindow::unrealize() if the Stage has already
been unrealized.

clutter/clutter-stage.c

index fe02984..0abe9e9 100644 (file)
@@ -1631,7 +1631,9 @@ clutter_stage_dispose (GObject *object)
     {
       CLUTTER_NOTE (BACKEND, "Disposing of the stage implementation");
 
-      _clutter_stage_window_unrealize (priv->impl);
+      if (CLUTTER_ACTOR_IS_REALIZED (object))
+        _clutter_stage_window_unrealize (priv->impl);
+
       g_object_unref (priv->impl);
       priv->impl = NULL;
     }