diff --git a/ChangeLog b/ChangeLog index 7a639fc06..06712bacc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-12-28 Emmanuele Bassi + + * clutter/clutter-texture.c: + (clutter_texture_unrealize): Do not read the pixels back if the + texture is being destroyed + 2007-12-28 Emmanuele Bassi * clutter/clutter-model.c: diff --git a/clutter/clutter-texture.c b/clutter/clutter-texture.c index 37c43b3ea..fb771c016 100644 --- a/clutter/clutter-texture.c +++ b/clutter/clutter-texture.c @@ -629,6 +629,13 @@ clutter_texture_unrealize (ClutterActor *actor) if (priv->tiles == NULL) return; + /* there's no need to read the pixels back when unrealizing inside + * a dispose run, and the dispose() call will release the GL + * texture data as well, so we can safely bail out now + */ + if (CLUTTER_PRIVATE_FLAGS (actor) & CLUTTER_ACTOR_IN_DESTRUCTION) + return; + CLUTTER_MARK(); if (clutter_feature_available (CLUTTER_FEATURE_TEXTURE_READ_PIXELS))