[gtk] popovermenu: Avoid an uninitialized variable
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] popovermenu: Avoid an uninitialized variable
- Date: Wed, 12 Feb 2020 23:02:41 +0000 (UTC)
commit 073e8dd987d0151248db72b33b5e97e004550873
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Feb 12 17:58:41 2020 -0500
popovermenu: Avoid an uninitialized variable
Pointed out by Timm/clang.
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2434
gtk/gtkpopovermenu.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/gtk/gtkpopovermenu.c b/gtk/gtkpopovermenu.c
index 6befff191f..e310033f12 100644
--- a/gtk/gtkpopovermenu.c
+++ b/gtk/gtkpopovermenu.c
@@ -148,6 +148,8 @@ gtk_popover_menu_set_active_item (GtkPopoverMenu *menu,
gtk_widget_set_state_flags (menu->active_item, GTK_STATE_FLAG_SELECTED, FALSE);
if (GTK_IS_MODEL_BUTTON (item))
g_object_get (item, "popover", &popover, NULL);
+ else
+ popover = NULL;
if (!popover || popover != menu->open_submenu)
gtk_widget_grab_focus (menu->active_item);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]