diff options
-rw-r--r-- | modules/printbackends/cups/gtkprintercups.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/modules/printbackends/cups/gtkprintercups.c b/modules/printbackends/cups/gtkprintercups.c index 154b23fcfc..e8c652f426 100644 --- a/modules/printbackends/cups/gtkprintercups.c +++ b/modules/printbackends/cups/gtkprintercups.c @@ -276,6 +276,8 @@ colord_client_profile_connect_cb (GObject *source_object, /* update the UI */ colord_update_ui_from_settings (printer); + + g_object_unref (printer); } static void @@ -303,10 +305,12 @@ colord_client_device_get_profile_for_qualifiers_cb (GObject *source_object, cd_profile_connect (printer->colord_profile, printer->colord_cancellable, colord_client_profile_connect_cb, - printer); + g_object_ref (printer)); out: /* update the UI */ colord_update_ui_from_settings (printer); + + g_object_unref (printer); } void @@ -364,7 +368,7 @@ gtk_printer_cups_update_settings (GtkPrinterCups *printer, (const gchar **) qualifiers, printer->colord_cancellable, colord_client_device_get_profile_for_qualifiers_cb, - printer); + g_object_ref (printer)); /* save for the future */ g_free (printer->colord_qualifier); @@ -398,6 +402,8 @@ colord_client_device_connect_cb (GObject *source_object, out: /* update the UI */ colord_update_ui_from_settings (printer); + + g_object_unref (printer); } static void @@ -425,10 +431,12 @@ colord_client_find_device_cb (GObject *source_object, cd_device_connect (printer->colord_device, printer->colord_cancellable, colord_client_device_connect_cb, - printer); + g_object_ref (printer)); out: /* update the UI */ colord_update_ui_from_settings (printer); + + g_object_unref (printer); } static void @@ -466,7 +474,7 @@ colord_update_device (GtkPrinterCups *printer) colord_device_id, printer->colord_cancellable, colord_client_find_device_cb, - printer); + g_object_ref (printer)); out: g_free (colord_device_id); @@ -493,6 +501,8 @@ colord_client_connect_cb (GObject *source_object, /* refresh the device */ colord_update_device (printer); + + g_object_unref (printer); } #endif @@ -537,7 +547,7 @@ gtk_printer_cups_new (const char *name, cd_client_connect (printer->colord_client, printer->colord_cancellable, colord_client_connect_cb, - printer); + g_object_ref (printer)); } #endif return printer; |