Check pointer before using it.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2379 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
cd66502f0e
commit
00193a810f
|
@ -641,10 +641,11 @@ IMeshSceneNode* CSceneManager::addOctTreeSceneNode(IMesh* mesh, ISceneNode* pare
|
|||
|
||||
COctTreeSceneNode* node = new COctTreeSceneNode(parent, this, id, minimalPolysPerNode);
|
||||
|
||||
if (mesh)
|
||||
node->createTree(mesh);
|
||||
|
||||
if (node)
|
||||
{
|
||||
node->setMesh(mesh);
|
||||
node->drop();
|
||||
}
|
||||
|
||||
return node;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue