ClutterActor: clear redraw entry before emitting signals
If the redraw entry is not cleared, queueing a redraw from a signal handler could reinsert the same object in the stage redraw list, causing the segfault later (as the object is immediately freed) https://bugzilla.gnome.org/show_bug.cgi?id=671173
This commit is contained in:
parent
251d3b545e
commit
018ede2b24
@ -6537,6 +6537,14 @@ _clutter_actor_finish_queue_redraw (ClutterActor *self,
|
||||
ClutterPaintVolume *pv;
|
||||
gboolean clipped;
|
||||
|
||||
/* Remove queue entry early in the process, otherwise a new
|
||||
queue_redraw() during signal handling could put back this
|
||||
object in the stage redraw list (but the entry is freed as
|
||||
soon as we return from this function, causing a segfault
|
||||
later)
|
||||
*/
|
||||
priv->queue_redraw_entry = NULL;
|
||||
|
||||
/* If we've been explicitly passed a clip volume then there's
|
||||
* nothing more to calculate, but otherwise the only thing we know
|
||||
* is that the change is constrained to the given actor.
|
||||
@ -6595,8 +6603,6 @@ _clutter_actor_finish_queue_redraw (ClutterActor *self,
|
||||
*/
|
||||
if (G_LIKELY (clipped))
|
||||
_clutter_actor_set_queue_redraw_clip (self, NULL);
|
||||
|
||||
priv->queue_redraw_entry = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user