forked from AuroraMiddleware/gtk
widget: Always assign values to out parameter in translate_coordinates
safe guard against people using the returned coordinate values without checking the return value of gtk_widget_translate_coordinates.
This commit is contained in:
parent
cc9a4c1720
commit
aee4634ee5
@ -4888,7 +4888,13 @@ gtk_widget_translate_coordinates (GtkWidget *src_widget,
|
||||
|
||||
ancestor = gtk_widget_common_ancestor (src_widget, dest_widget);
|
||||
if (!ancestor || !_gtk_widget_get_realized (src_widget) || !_gtk_widget_get_realized (dest_widget))
|
||||
return FALSE;
|
||||
{
|
||||
if (dest_x)
|
||||
*dest_x = 0;
|
||||
if (dest_y)
|
||||
*dest_y = 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
parent = src_widget;
|
||||
|
Loading…
Reference in New Issue
Block a user