Commit 00193a81 authored by hybrid's avatar hybrid

Check pointer before using it.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2379 dfc29bdd-3216-0410-991c-e03cc46cb475
parent cd66502f
......@@ -641,10 +641,11 @@ IMeshSceneNode* CSceneManager::addOctTreeSceneNode(IMesh* mesh, ISceneNode* pare
COctTreeSceneNode* node = new COctTreeSceneNode(parent, this, id, minimalPolysPerNode);
if (mesh)
node->createTree(mesh);
node->drop();
if (node)
{
node->setMesh(mesh);
node->drop();
}
return node;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment