Merge pull request #1256 from Azaezel/alpha41/orphanOops

getPrefabByCHild should skip NULLs
This commit is contained in:
Brian Roberts 2024-04-15 17:55:24 -05:00 committed by GitHub
commit 848db69ef1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;