popovermenu: Avoid an uninitialized variable

Pointed out by Timm/clang.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2434
This commit is contained in:
Matthias Clasen 2020-02-12 17:58:41 -05:00
parent 6c6b3d0d11
commit 073e8dd987

View File

@ -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);