[Xfce4-commits] <xfce4-indicator-plugin:master> Cleaning some runtime GObject assert violations
Andrzej
noreply at xfce.org
Thu Apr 4 17:44:08 CEST 2013
Updating branch refs/heads/master
to d0bef06d946defc9fb2ae3682b1498092906713e (commit)
from 81aecb3bc340f90b460d73f61d2ddea443416075 (commit)
commit d0bef06d946defc9fb2ae3682b1498092906713e
Author: Andrzej <ndrwrdck at gmail.com>
Date: Sun Apr 8 23:57:21 2012 +0900
Cleaning some runtime GObject assert violations
panel-plugin/indicator-button.c | 42 ++++++++++++--------------------------
1 files changed, 13 insertions(+), 29 deletions(-)
diff --git a/panel-plugin/indicator-button.c b/panel-plugin/indicator-button.c
index 3b634cf..58810ad 100644
--- a/panel-plugin/indicator-button.c
+++ b/panel-plugin/indicator-button.c
@@ -93,35 +93,18 @@ xfce_indicator_button_finalize (GObject *object)
XfceIndicatorButton *button = XFCE_INDICATOR_BUTTON (object);
if (button->label != NULL)
- {
- g_object_unref (G_OBJECT (button->label));
- button->label = NULL;
- }
+ g_object_unref (G_OBJECT (button->label));
if (button->orig_icon != NULL)
- {
- g_object_unref (G_OBJECT (button->orig_icon));
- button->orig_icon = NULL;
- }
+ g_object_unref (G_OBJECT (button->orig_icon));
if (button->icon != NULL)
- {
- g_object_unref (G_OBJECT (button->icon));
- button->icon = NULL;
- }
- if (button->io != NULL)
- {
- g_object_unref (G_OBJECT (button->io));
- button->io = NULL;
- }
- if (button->entry != NULL)
- {
- g_object_unref (G_OBJECT (button->entry));
- button->entry = NULL;
- }
+ g_object_unref (G_OBJECT (button->icon));
if (button->menu != NULL)
- {
- g_object_unref (G_OBJECT (button->menu));
- button->menu = NULL;
- }
+ g_object_unref (G_OBJECT (button->menu));
+ /* IndicatorObjectEntry is not GObject */
+ /* if (button->entry != NULL) */
+ /* g_object_unref (G_OBJECT (button->entry)); */
+ if (button->io != NULL)
+ g_object_unref (G_OBJECT (button->io));
G_OBJECT_CLASS (xfce_indicator_button_parent_class)->finalize (object);
}
@@ -442,10 +425,11 @@ xfce_indicator_button_new (IndicatorObject *io,
XfceIndicatorButton *button = g_object_new (XFCE_TYPE_INDICATOR_BUTTON, NULL);
button->io = io;
button->entry = entry;
- g_object_ref (G_OBJECT (button->io));
- g_object_ref (G_OBJECT (button->entry));
+ if (button->io != NULL)
+ g_object_ref (G_OBJECT (button->io));
+ /* IndicatorObjectEntry is not GObject */
+ /* g_object_ref (G_OBJECT (button->entry)); */
return GTK_WIDGET (button);
}
-
More information about the Xfce4-commits
mailing list