[gnome-control-center] printers: Return after callback



commit c34e282babfc6e7d90c9f9a832c186b2c8a3288f
Author: Marek Kasik <mkasik redhat com>
Date:   Mon Sep 3 21:16:06 2012 +0200

    printers: Return after callback
    
    Return from get_ppds_attribute_async() right after callback
    was called. Otherwise the callback could be called twice. (#683229)

 panels/printers/pp-utils.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/panels/printers/pp-utils.c b/panels/printers/pp-utils.c
index 9d40a0a..55f0c03 100644
--- a/panels/printers/pp-utils.c
+++ b/panels/printers/pp-utils.c
@@ -3188,7 +3188,10 @@ get_ppds_attribute_async (gchar       **ppds_names,
   GError  *error = NULL;
 
   if (!ppds_names || !attribute_name)
-    callback (NULL, user_data);
+    {
+      callback (NULL, user_data);
+      return;
+    }
 
   data = g_new0 (GPAData, 1);
   data->ppds_names = g_strdupv (ppds_names);



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