widget: Avoid uninitialized access

Initialize all field in the GtkCrossingData struct
when synthesizing crossing events.

Fixes: #2743
This commit is contained in:
Matthias Clasen 2020-06-28 11:24:09 -04:00
parent a6752bd3e0
commit 5229069101

View File

@ -7539,9 +7539,11 @@ _gtk_widget_synthesize_crossing (GtkWidget *from,
g_return_if_fail (from != NULL || to != NULL); g_return_if_fail (from != NULL || to != NULL);
crossing.type = GTK_CROSSING_POINTER; crossing.type = GTK_CROSSING_POINTER;
crossing.old_target = from;
crossing.new_target = to;
crossing.mode = mode; crossing.mode = mode;
crossing.old_target = from;
crossing.old_descendent = NULL;
crossing.new_target = to;
crossing.new_descendent = NULL;
if (from) if (from)
{ {