diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index df9a45d882..2b5fd88e2a 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -12727,12 +12727,10 @@ _gtk_widget_peek_style_context (GtkWidget *widget) GtkStyleContext * gtk_widget_get_style_context (GtkWidget *widget) { - GtkWidgetPrivate *priv; + GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget); g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL); - priv = widget->priv; - if (G_UNLIKELY (priv->context == NULL)) { GdkDisplay *display; @@ -12757,7 +12755,7 @@ gtk_widget_get_style_context (GtkWidget *widget) _gtk_widget_get_style_context (priv->parent)); } - return widget->priv->context; + return priv->context; } /**