Skip to content

st/theme-context: Also invalidate root node on stylesheet changes

Since commit 6a42d772 we invalidate the cached properties for each theme node on stylesheet changes by iterating over the hashtable of the theme context instead of listening to the signal in each individual theme node.

That commit forgot one particular node though that's not stored in the hashtable, but using the priv->root_node property instead: The theme node that belongs to the stage.

So make sure we also invalidate the cached properties of the stage theme node on stylesheet changes. This fixes various crashes that happened with extensions providing custom stylesheets (emitting the "custom-stylesheets-changed" signal on every extension enable/disable), trying to access an already freed CSS property of the stage.

Fixes: #2584 (closed)

Merge request reports