Check pointer before using it.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2379 dfc29bdd-3216-0410-991c-e03cc46cb475
master
hybrid 2009-05-08 16:30:57 +00:00
parent cd66502f0e
commit 00193a810f
1 changed files with 5 additions and 4 deletions

View File

@ -641,10 +641,11 @@ IMeshSceneNode* CSceneManager::addOctTreeSceneNode(IMesh* mesh, ISceneNode* pare
COctTreeSceneNode* node = new COctTreeSceneNode(parent, this, id, minimalPolysPerNode); COctTreeSceneNode* node = new COctTreeSceneNode(parent, this, id, minimalPolysPerNode);
if (mesh) if (node)
node->createTree(mesh); {
node->setMesh(mesh);
node->drop(); node->drop();
}
return node; return node;
} }