[gdm/wip/two: 6/8] display: Enforce a few invariants



commit 07a017bcd8455d1ad5a5a09e8a709577c2a0524b
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Tue Feb 25 12:21:52 2014 -0500

    display: Enforce a few invariants
    
    The GdmDisplay should only be cleaned up if it's finished
    or failed.

 daemon/gdm-display.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/daemon/gdm-display.c b/daemon/gdm-display.c
index a3085dd..ebb5338 100644
--- a/daemon/gdm-display.c
+++ b/daemon/gdm-display.c
@@ -1243,6 +1243,9 @@ gdm_display_dispose (GObject *object)
 
         g_debug ("GdmDisplay: Disposing display");
 
+        g_assert (display->priv->status == GDM_DISPLAY_FINISHED ||
+                  display->priv->status == GDM_DISPLAY_FAILED);
+
         if (display->priv->slave != NULL) {
                 gdm_slave_stop (display->priv->slave);
                 g_object_unref (display->priv->slave);


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