[gtk+] spinbutton: Trivial cleanup
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] spinbutton: Trivial cleanup
- Date: Thu, 29 Oct 2015 03:43:43 +0000 (UTC)
commit 811c1c9484aedc5b520d26163441d09b70078e57
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Oct 28 16:35:16 2015 -0400
spinbutton: Trivial cleanup
Use g_clear_object in a few places.
gtk/gtkspinbutton.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c
index bac8bde..a148c06 100644
--- a/gtk/gtkspinbutton.c
+++ b/gtk/gtkspinbutton.c
@@ -736,11 +736,8 @@ gtk_spin_button_finalize (GObject *object)
gtk_spin_button_unset_adjustment (spin_button);
- if (priv->down_panel_context)
- g_object_unref (priv->down_panel_context);
-
- if (priv->up_panel_context)
- g_object_unref (priv->up_panel_context);
+ g_clear_object (&priv->up_panel_context);
+ g_clear_object (&priv->down_panel_context);
g_object_unref (priv->swipe_gesture);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]