forked from AuroraMiddleware/gtk
Fixed gtk_recent_chooser_menu_set_current_filter to update the local pointer.
Before this patch, unsetting the filter manually before disposing the recent chooser menu (or unsetting the filter twice), would cause warnings (or invalid memory accesses).
This commit is contained in:
parent
45d05f52c2
commit
420f2fbddc
@ -711,11 +711,10 @@ gtk_recent_chooser_menu_set_current_filter (GtkRecentChooserMenu *menu,
|
||||
if (priv->current_filter)
|
||||
g_object_unref (G_OBJECT (priv->current_filter));
|
||||
|
||||
if (filter)
|
||||
{
|
||||
priv->current_filter = filter;
|
||||
g_object_ref_sink (priv->current_filter);
|
||||
}
|
||||
priv->current_filter = filter;
|
||||
|
||||
if (priv->current_filter)
|
||||
g_object_ref_sink (priv->current_filter);
|
||||
|
||||
gtk_recent_chooser_menu_populate (menu);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user