~didrocks/indicator-appmenu/jayatana

« back to all changes in this revision

Viewing changes to src/window-menu-model.c

  • Committer: Tarmac
  • Author(s): Lars Uebernickel
  • Date: 2013-10-24 22:37:04 UTC
  • mfrom: (246.1.2 destroy-widget)
  • Revision ID: tarmac-20131024223704-rdgd6gaqq7dsury0
Call gtk_widget_destroy() to break potential ref cycles
  
Calling g_object_unref() is not enough for many of gtk's widgets.

Approved by Charles Kerr, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
132
132
        }
133
133
 
134
134
        g_clear_object(&menu->priv->win_menu_model);
135
 
        g_clear_object(&menu->priv->win_menu);
 
135
 
 
136
        if (menu->priv->win_menu) {
 
137
                gtk_widget_destroy (GTK_WIDGET (menu->priv->win_menu));
 
138
                g_object_unref (menu->priv->win_menu);
 
139
                menu->priv->win_menu = NULL;
 
140
        }
136
141
 
137
142
        g_clear_object(&menu->priv->unity_actions);
138
143
        g_clear_object(&menu->priv->win_actions);