mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 22:10: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;
|
GtkCssStyle *style;
|
||||||
GskTexture *texture;
|
GskTexture *texture;
|
||||||
|
|
||||||
|
style = gtk_css_node_get_style (gtk_css_gadget_get_node (GTK_CSS_GADGET (self)));
|
||||||
|
|
||||||
gtk_icon_helper_ensure_texture (self);
|
gtk_icon_helper_ensure_texture (self);
|
||||||
texture = self->priv->texture;
|
texture = self->priv->texture;
|
||||||
if (texture == NULL)
|
if (texture == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
style = gtk_css_node_get_style (gtk_css_gadget_get_node (GTK_CSS_GADGET (self)));
|
|
||||||
|
|
||||||
gtk_css_style_snapshot_icon_texture (style,
|
gtk_css_style_snapshot_icon_texture (style,
|
||||||
snapshot,
|
snapshot,
|
||||||
texture,
|
texture,
|
||||||
|
Loading…
Reference in New Issue
Block a user