diff options
author | Carlos Garcia Campos <cgarcia@igalia.com> | 2013-03-25 12:09:52 +0100 |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@gnome.org> | 2013-03-25 14:40:50 +0100 |
commit | b29cd63c381a1f10356e914dfe55b9f47ed05dab (patch) | |
tree | 870a2161dc51829da7f09fc90da2038c743e9ef1 /modules | |
parent | 54c137d1ea2779a6cc54180186613d6883675867 (diff) | |
download | gtk+-b29cd63c381a1f10356e914dfe55b9f47ed05dab.tar.gz |
gtkprintbackendcups: Fix a crash in gtk_print_backend_cups_finalize()
If GtkPrintBackendCups is finalized and cups_get_printer_list hasn't
been called, g_object_unref is called for the GDBusConnection pointer
that is NULL. Use g_clear_object() instead.
https://bugzilla.gnome.org/show_bug.cgi?id=696546
Diffstat (limited to 'modules')
-rw-r--r-- | modules/printbackends/cups/gtkprintbackendcups.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/printbackends/cups/gtkprintbackendcups.c b/modules/printbackends/cups/gtkprintbackendcups.c index 64b92bcddd..45aa007bce 100644 --- a/modules/printbackends/cups/gtkprintbackendcups.c +++ b/modules/printbackends/cups/gtkprintbackendcups.c @@ -852,7 +852,7 @@ gtk_print_backend_cups_finalize (GObject *object) g_clear_object (&backend_cups->avahi_cancellable); g_clear_pointer (&backend_cups->avahi_default_printer, g_free); - g_object_unref (backend_cups->dbus_connection); + g_clear_object (&backend_cups->dbus_connection); #endif backend_parent_class->finalize (object); |