[gtk/gtk-4-2: 16/91] modelbutton: Avoid a crash
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-4-2: 16/91] modelbutton: Avoid a crash
- Date: Tue, 4 May 2021 02:05:40 +0000 (UTC)
commit b7a0744324992c745eecb2f0f4983c809a1eeda4
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Apr 5 14:06:42 2021 -0400
modelbutton: Avoid a crash
We may not have a popover menu ancestor. The check for
this was forgotten in one of the branches here.
Fixes: #3831
gtk/gtkmodelbutton.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkmodelbutton.c b/gtk/gtkmodelbutton.c
index aa376d8945..531fa25dea 100644
--- a/gtk/gtkmodelbutton.c
+++ b/gtk/gtkmodelbutton.c
@@ -1404,7 +1404,8 @@ pointer_cb (GObject *object,
GtkModelButton *button = data;
stop_open (button);
- gtk_popover_menu_set_active_item (GTK_POPOVER_MENU (popover), NULL);
+ if (popover)
+ gtk_popover_menu_set_active_item (GTK_POPOVER_MENU (popover), NULL);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]