aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/menus/gal-view-menus.c
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/menus/gal-view-menus.c')
-rw-r--r--widgets/menus/gal-view-menus.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/widgets/menus/gal-view-menus.c b/widgets/menus/gal-view-menus.c
index 353b3560ed..2b2677a5bd 100644
--- a/widgets/menus/gal-view-menus.c
+++ b/widgets/menus/gal-view-menus.c
@@ -87,6 +87,12 @@ gvm_destroy (GtkObject *object)
free_verbs(gvm);
remove_xml(gvm);
+
+ if (gvm->priv->component) {
+ bonobo_object_unref (BONOBO_OBJECT (gvm->priv->component));
+ gvm->priv->component = NULL;
+ }
+
g_free(gvm->priv);
gvm->priv = NULL;
@@ -300,6 +306,12 @@ gal_view_menus_apply (GalViewMenus *gvm,
BonoboUIComponent *component,
CORBA_Environment *ev)
{
+ if (component)
+ bonobo_object_ref (BONOBO_OBJECT (component));
+
+ if (gvm->priv->component)
+ bonobo_object_unref (BONOBO_OBJECT (gvm->priv->component));
+
gvm->priv->component = component;
build_stuff (gvm, ev);