mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
renderer: Assert having been unrealized in dispose
We cannot unrealize a renderer in the dispose function, because that would cause this chain to happen: gsk_gl_renderer_dispose gsk_renderer_dispose gsk_renderer_unrealize gsk_gl_renderer_unrealize So we would call into thje GL renderers unrealize when it has already (partially) disposed itself and ause accesses to dead variables.
This commit is contained in:
parent
4c2bae3a1a
commit
bd287ba3cf
@ -170,7 +170,9 @@ gsk_renderer_dispose (GObject *gobject)
|
||||
GskRenderer *self = GSK_RENDERER (gobject);
|
||||
GskRendererPrivate *priv = gsk_renderer_get_instance_private (self);
|
||||
|
||||
gsk_renderer_unrealize (self);
|
||||
/* We can't just unrealize here because superclasses have already run dispose.
|
||||
* So we insist that unrealize must be called before unreffing. */
|
||||
g_assert (!priv->is_realized);
|
||||
|
||||
g_clear_object (&priv->profiler);
|
||||
g_clear_object (&priv->display);
|
||||
|
Loading…
Reference in New Issue
Block a user