[gtk+] popover: Avoid a crash when no relative-to widget is set
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] popover: Avoid a crash when no relative-to widget is set
- Date: Wed, 18 Nov 2015 03:49:31 +0000 (UTC)
commit 87b10e6f60f84ae4ed4ca7058a006330d8cca31f
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Nov 17 22:48:35 2015 -0500
popover: Avoid a crash when no relative-to widget is set
This was showing up in glade, which creates freestanding
popovers.
gtk/gtkpopover.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c
index cce113f..8a56db0 100644
--- a/gtk/gtkpopover.c
+++ b/gtk/gtkpopover.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]