mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-05 13:30:34 +00:00
Merge pull request #1256 from Azaezel/alpha41/orphanOops
getPrefabByCHild should skip NULLs
This commit is contained in:
commit
848db69ef1
1 changed files with 2 additions and 0 deletions
|
|
@ -460,6 +460,8 @@ void Prefab::_onFileChanged( const Torque::Path &path )
|
|||
|
||||
Prefab* Prefab::getPrefabByChild( SimObject *child )
|
||||
{
|
||||
if (child == NULL) return NULL;
|
||||
|
||||
ChildToPrefabMap::Iterator itr = smChildToPrefabMap.find( child->getId() );
|
||||
if ( itr == smChildToPrefabMap.end() )
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue