[gnome-control-center] printers: Don't pass GFile references around



commit 5f4599d64959cb7f257ce9f0c62e6e10a79e1eff
Author: Robert Ancell <robert ancell canonical com>
Date:   Fri Jun 26 16:40:05 2020 +1200

    printers: Don't pass GFile references around
    
    An internal GTask will hold a reference to it for the duration of the async call.

 panels/printers/pp-utils.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/panels/printers/pp-utils.c b/panels/printers/pp-utils.c
index b62813009..ef11053e1 100644
--- a/panels/printers/pp-utils.c
+++ b/panels/printers/pp-utils.c
@@ -1539,7 +1539,6 @@ printer_set_ppd_file_async_scb (GObject      *source_object,
   success = g_file_copy_finish (G_FILE (source_object),
                                 res,
                                 &error);
-  g_object_unref (source_object);
 
   if (!success)
     {
@@ -1596,7 +1595,7 @@ printer_set_ppd_file_async (const gchar  *printer_name,
 {
   g_autoptr(GFileIOStream) stream = NULL;
   PSPData       *data;
-  GFile         *source_ppd_file;
+  g_autoptr(GFile) source_ppd_file = NULL;
   g_autoptr(GFile) destination_ppd_file = NULL;
 
   data = g_new0 (PSPData, 1);


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