Skip to content

Commit 848db69

Browse files
authored
Merge pull request #1256 from Azaezel/alpha41/orphanOops
getPrefabByCHild should skip NULLs
2 parents ea554d0 + 785872d commit 848db69

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Engine/source/T3D/prefab.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,8 @@ void Prefab::_onFileChanged( const Torque::Path &path )
460460

461461
Prefab* Prefab::getPrefabByChild( SimObject *child )
462462
{
463+
if (child == NULL) return NULL;
464+
463465
ChildToPrefabMap::Iterator itr = smChildToPrefabMap.find( child->getId() );
464466
if ( itr == smChildToPrefabMap.end() )
465467
return NULL;

0 commit comments

Comments
 (0)