forked from AuroraMiddleware/gtk
GtkPopover: Don't ref NULL widgets
gtk_window_get_default_widget returns NULL if the window does not have a default widget, so don't ref it in that case.
This commit is contained in:
parent
8c7e1f08ac
commit
c28275f4ec
@ -582,6 +582,7 @@ gtk_popover_map (GtkWidget *widget)
|
||||
GtkPopoverPrivate *priv = GTK_POPOVER (widget)->priv;
|
||||
|
||||
priv->prev_default = gtk_window_get_default_widget (priv->window);
|
||||
if (priv->prev_default)
|
||||
g_object_ref (priv->prev_default);
|
||||
|
||||
GTK_WIDGET_CLASS (gtk_popover_parent_class)->map (widget);
|
||||
|
Loading…
Reference in New Issue
Block a user