gnome-screensaver r1652 - in trunk: . src



Author: mccann
Date: Tue Apr 14 01:20:49 2009
New Revision: 1652
URL: http://svn.gnome.org/viewvc/gnome-screensaver?rev=1652&view=rev

Log:
2009-04-13  William Jon McCann  <jmccann redhat com>

	* src/gs-listener-dbus.c (listener_remove_ref_entry):
	Don't try to remove an invalid inhibitor entry.
	Fixes #578669



Modified:
   trunk/ChangeLog
   trunk/src/gs-listener-dbus.c

Modified: trunk/src/gs-listener-dbus.c
==============================================================================
--- trunk/src/gs-listener-dbus.c	(original)
+++ trunk/src/gs-listener-dbus.c	Tue Apr 14 01:20:49 2009
@@ -734,24 +734,28 @@
         gboolean            removed;
         GSListenerRefEntry *entry;
 
+        removed = FALSE;
+
         hash = get_hash_for_entry_type (listener, entry_type);
 
         entry = g_hash_table_lookup (hash, &cookie);
-        if (entry != NULL) {
-                gs_debug ("removing %s from %s for reason '%s' on connection %s",
-                          get_name_for_entry_type (entry_type),
-                          entry->application,
-                          entry->reason,
-                          entry->connection);
+        if (entry == NULL) {
+                goto out;
         }
 
+        gs_debug ("removing %s from %s for reason '%s' on connection %s",
+                  get_name_for_entry_type (entry_type),
+                  entry->application,
+                  entry->reason,
+                  entry->connection);
+
         if (entry_type == REF_ENTRY_TYPE_INHIBIT) {
                 /* remove inhibit from gnome session */
                 remove_session_inhibit (listener, entry);
         }
 
         removed = g_hash_table_remove (hash, &cookie);
-
+ out:
         if (removed) {
                 listener_ref_entry_check (listener, entry_type);
         } else {



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