mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-15 21:20:09 +00:00
widget: Typecheck before deref in translate_coords
https://bugzilla.gnome.org/show_bug.cgi?id=771279
This commit is contained in:
parent
3509918e39
commit
81d1aaa062
@ -6281,8 +6281,8 @@ gtk_widget_translate_coordinates (GtkWidget *src_widget,
|
||||
gint *dest_x,
|
||||
gint *dest_y)
|
||||
{
|
||||
GtkWidgetPrivate *src_priv = src_widget->priv;
|
||||
GtkWidgetPrivate *dest_priv = dest_widget->priv;
|
||||
GtkWidgetPrivate *src_priv;
|
||||
GtkWidgetPrivate *dest_priv;
|
||||
GtkWidget *ancestor;
|
||||
GdkWindow *window;
|
||||
GList *dest_list = NULL;
|
||||
@ -6294,6 +6294,9 @@ gtk_widget_translate_coordinates (GtkWidget *src_widget,
|
||||
if (!ancestor || !_gtk_widget_get_realized (src_widget) || !_gtk_widget_get_realized (dest_widget))
|
||||
return FALSE;
|
||||
|
||||
src_priv = src_widget->priv;
|
||||
dest_priv = dest_widget->priv;
|
||||
|
||||
/* Translate from allocation relative to window relative */
|
||||
if (_gtk_widget_get_has_window (src_widget) && src_priv->parent)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user