[gdm/wip/wayland-for-merge: 9/20] display: Enforce a few invariants



commit efbb53adbea9c13363941ccf7aa279b9dfb559e0
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 bfd945f..7fafd28 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]