popover: Avoid a crash when no relative-to widget is set

This was showing up in glade, which creates freestanding
popovers.
This commit is contained in:
Matthias Clasen 2015-11-17 22:48:35 -05:00
parent f79aef67f8
commit 87b10e6f60

View File

@ -1370,6 +1370,9 @@ gtk_popover_check_invalidate_borders (GtkPopover *popover)
GtkPositionType gap_side;
gint tip_x, tip_y;
if (!priv->widget)
return;
gtk_popover_get_gap_coords (popover, NULL, NULL,
&tip_x, &tip_y, NULL, NULL,
&gap_side);