diff options
author | Benjamin Otte <otte@redhat.com> | 2016-12-23 23:16:30 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2016-12-24 06:19:16 +0100 |
commit | 1d845557297ddd114bb6e2c8d2332895967c9d42 (patch) | |
tree | 310a2a75221a92d7d8a87f387eb81513d11c85f3 /gtk/gtkiconhelper.c | |
parent | 89d38ae93f4f45776e55446524fb59cfa27442bc (diff) | |
download | gtk+-1d845557297ddd114bb6e2c8d2332895967c9d42.tar.gz |
iconhelper: Invalidate style before accessing texture
Invalidating the style might cause invalidation of the texture. So we
end up with a pointer to freed memory.
SAD!
Diffstat (limited to 'gtk/gtkiconhelper.c')
-rw-r--r-- | gtk/gtkiconhelper.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtkiconhelper.c b/gtk/gtkiconhelper.c index 82576fd7ba..9f3cdb1fd6 100644 --- a/gtk/gtkiconhelper.c +++ b/gtk/gtkiconhelper.c @@ -873,13 +873,13 @@ gtk_icon_helper_snapshot (GtkIconHelper *self, GtkCssStyle *style; GskTexture *texture; + style = gtk_css_node_get_style (gtk_css_gadget_get_node (GTK_CSS_GADGET (self))); + gtk_icon_helper_ensure_texture (self); texture = self->priv->texture; if (texture == NULL) return; - style = gtk_css_node_get_style (gtk_css_gadget_get_node (GTK_CSS_GADGET (self))); - gtk_css_style_snapshot_icon_texture (style, snapshot, texture, |