[Bf-blender-cvs] [9df9ee5] alembic_pointcache: Additional sanity checks needed in the cache reader because accessing non-existent child objects when reading Alembic can cause crash.

Lukas Tönne noreply at git.blender.org
Tue Nov 4 18:02:27 CET 2014


Commit: 9df9ee568afd7c66ff408992e0143ed5030f7fe7
Author: Lukas Tönne
Date:   Tue Nov 4 18:00:30 2014 +0100
Branches: alembic_pointcache
https://developer.blender.org/rB9df9ee568afd7c66ff408992e0143ed5030f7fe7

Additional sanity checks needed in the cache reader because accessing
non-existent child objects when reading Alembic can cause crash.

This should be generalized somewhat later to ensure consistency between
different reader models.

===================================================================

M	source/blender/pointcache/intern/mesh.cpp

===================================================================

diff --git a/source/blender/pointcache/intern/mesh.cpp b/source/blender/pointcache/intern/mesh.cpp
index 2b3de1f..2781de6 100644
--- a/source/blender/pointcache/intern/mesh.cpp
+++ b/source/blender/pointcache/intern/mesh.cpp
@@ -104,7 +104,8 @@ PointCacheReader::PointCacheReader(Scene *scene, Object *ob, PointCacheModifierD
 {
 	if (m_archive.valid()) {
 		IObject root = m_archive.getTop();
-		m_mesh = IPolyMesh(root, m_pcmd->modifier.name);
+		if (root.valid() && root.getChild(m_pcmd->modifier.name))
+			m_mesh = IPolyMesh(root, m_pcmd->modifier.name);
 	}
 }




More information about the Bf-blender-cvs mailing list