From 04d688c182981ee00bb33ca97dc3b45982db048d Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Mon, 2 Feb 2004 21:57:37 +0000 Subject: don't generate a g_warning if button_icon == NULL. (component_info_free): 2004-02-02 Chris Toshok * e-component-registry.c (component_info_new): don't generate a g_warning if button_icon == NULL. (component_info_free): unref the button_icon if it's != NULL. svn path=/trunk/; revision=24573 --- shell/e-component-registry.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'shell/e-component-registry.c') diff --git a/shell/e-component-registry.c b/shell/e-component-registry.c index b1a6560078..40568485b1 100644 --- a/shell/e-component-registry.c +++ b/shell/e-component-registry.c @@ -66,7 +66,8 @@ component_info_new (const char *id, info->sort_order = sort_order; info->button_icon = button_icon; - g_object_ref (button_icon); + if (info->button_icon) + g_object_ref (info->button_icon); return info; } @@ -78,6 +79,9 @@ component_info_free (EComponentInfo *info) g_free (info->alias); g_free (info->button_label); + if (info->button_icon) + g_object_unref (info->button_icon); + if (info->iface != NULL) bonobo_object_release_unref (info->iface, NULL); -- cgit v1.2.3