aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLars Uebernickel <lars.uebernickel@canonical.com>2012-02-03 14:53:25 +0100
committerLars Uebernickel <lars.uebernickel@canonical.com>2012-02-03 14:53:25 +0100
commit0b0215ae0af11634a648412cc5cb927379bd333b (patch)
tree89c44a2ffd7b1cf465afa53e5b710fc8fa957cca /src
parent8991f40a345d833cc991438936b6e7f5fc722a70 (diff)
downloadayatana-indicator-printers-0b0215ae0af11634a648412cc5cb927379bd333b.tar.gz
ayatana-indicator-printers-0b0215ae0af11634a648412cc5cb927379bd333b.tar.bz2
ayatana-indicator-printers-0b0215ae0af11634a648412cc5cb927379bd333b.zip
indicator-printers-menu: ref cups_notifier
Diffstat (limited to 'src')
-rw-r--r--src/indicator-printers-menu.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/indicator-printers-menu.c b/src/indicator-printers-menu.c
index 2228ba2..d029b75 100644
--- a/src/indicator-printers-menu.c
+++ b/src/indicator-printers-menu.c
@@ -303,12 +303,11 @@ indicator_printers_menu_set_cups_notifier (IndicatorPrintersMenu *self,
"any-signal", update_job, self,
"any-signal", on_printer_state_changed, self,
NULL);
- g_object_unref (self->priv->cups_notifier);
+ g_clear_object (&self->priv->cups_notifier);
}
- self->priv->cups_notifier = cups_notifier;
-
- if (self->priv->cups_notifier) {
+ if (cups_notifier) {
+ self->priv->cups_notifier = g_object_ref (cups_notifier);
g_object_connect (self->priv->cups_notifier,
"signal::job-created", update_job, self,
"signal::job-state", update_job, self,