mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 16:25:42 +00:00
getPrefabByCHild should skip NULLs
This commit is contained in:
parent
71e0626ec2
commit
785872d398
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 )
|
Prefab* Prefab::getPrefabByChild( SimObject *child )
|
||||||
{
|
{
|
||||||
|
if (child == NULL) return NULL;
|
||||||
|
|
||||||
ChildToPrefabMap::Iterator itr = smChildToPrefabMap.find( child->getId() );
|
ChildToPrefabMap::Iterator itr = smChildToPrefabMap.find( child->getId() );
|
||||||
if ( itr == smChildToPrefabMap.end() )
|
if ( itr == smChildToPrefabMap.end() )
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue