popover: Don't try to compute_bounds of a NULL child

This commit is contained in:
Timm Bäder 2019-03-16 06:16:28 +01:00
parent f2dff5115f
commit 36e00ae95e

View File

@ -338,7 +338,8 @@ gesture_released (GtkGestureMultiPress *gesture,
return;
child = gtk_bin_get_child (GTK_BIN (popover));
if (!gtk_widget_compute_bounds (child, GTK_WIDGET (popover), &child_bounds) ||
if (!child ||
!gtk_widget_compute_bounds (child, GTK_WIDGET (popover), &child_bounds) ||
!graphene_rect_contains_point (&child_bounds,
&(graphene_point_t){x, y}))
gtk_popover_popdown (popover);