mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 21:51:08 +00:00
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!
This commit is contained in:
parent
89d38ae93f
commit
1d84555729
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user