forked from AuroraMiddleware/gtk
gtkmenu: Fix potential use of uninitialised variables
The child_height out variable is only valid if compute_child_offset() returns TRUE. Found by scan-build. https://bugzilla.gnome.org/show_bug.cgi?id=712760
This commit is contained in:
parent
480a005039
commit
a265d8f32d
@ -5414,9 +5414,9 @@ gtk_menu_real_move_scroll (GtkMenu *menu,
|
||||
{
|
||||
gint child_height;
|
||||
|
||||
compute_child_offset (menu, menu_shell->priv->active_menu_item,
|
||||
&child_offset, &child_height, NULL);
|
||||
child_offset += child_height / 2;
|
||||
if (compute_child_offset (menu, menu_shell->priv->active_menu_item,
|
||||
&child_offset, &child_height, NULL))
|
||||
child_offset += child_height / 2;
|
||||
}
|
||||
|
||||
menu_shell->priv->ignore_enter = TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user