[gtk+] gtkprintunixdialog: Fix a potential g_object_unref(NULL) call
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtkprintunixdialog: Fix a potential g_object_unref(NULL) call
- Date: Tue, 10 Mar 2015 07:32:30 +0000 (UTC)
commit ac4da770e10fa293a7c99bb3c4bcb8490f431e7f
Author: Philip Withnall <philip withnall collabora co uk>
Date: Tue Nov 26 15:08:08 2013 +0000
gtkprintunixdialog: Fix a potential g_object_unref(NULL) call
The code above checks whether (printer == NULL), so we’d better do so
here as well.
Found by scan-build.
https://bugzilla.gnome.org/show_bug.cgi?id=712760
gtk/gtkprintunixdialog.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c
index 85fca0d..cca1dc5 100644
--- a/gtk/gtkprintunixdialog.c
+++ b/gtk/gtkprintunixdialog.c
@@ -961,7 +961,7 @@ void set_cell_sensitivity_func (GtkTreeViewColumn *tree_column,
else
g_object_set (cell, "sensitive", TRUE, NULL);
- g_object_unref (printer);
+ g_clear_object (&printer);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]