summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte.benjamin@googlemail.com>2018-03-20 15:36:19 +0000
committerBenjamin Otte <otte.benjamin@googlemail.com>2018-03-20 15:36:19 +0000
commite798eedfb61860c745aa2bf29bca18c7efb574f2 (patch)
treedbd5a602a6703147d15842117e77a621a2afbe71
parente6cd6f8db6007ba887563b6507e25bb169f48920 (diff)
parentf440c48deab698057800d8e74de14c6589499df0 (diff)
downloadgtk+-e798eedfb61860c745aa2bf29bca18c7efb574f2.tar.gz
Merge branch 'style-context-null-widget-guard-master' into 'master'
gtkstylecontext: guard against gtk_css_widget_node_get_widget() returning NULL in more places See merge request GNOME/gtk!71
-rw-r--r--gtk/gtkstylecontext.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index 16897067d0..5ea19b3d7b 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -170,7 +170,11 @@ gtk_style_context_real_changed (GtkStyleContext *context)
GtkStyleContextPrivate *priv = gtk_style_context_get_instance_private (context);
if (GTK_IS_CSS_WIDGET_NODE (priv->cssnode))
- _gtk_widget_style_context_invalidated (gtk_css_widget_node_get_widget (GTK_CSS_WIDGET_NODE (priv->cssnode)));
+ {
+ GtkWidget *widget = gtk_css_widget_node_get_widget (GTK_CSS_WIDGET_NODE (priv->cssnode));
+ if (widget != NULL)
+ _gtk_widget_style_context_invalidated (widget);
+ }
}
static void