Bugfix from Rivensin: idAnimState::Save() checks if(animator != NULL)

at least in Rivensin this caused crashes, possible that it causes
trouble here as well (Rivensin is based on Dentonmod after all)
This commit is contained in:
Daniel Gibson 2021-01-18 03:36:12 +01:00
parent 4a2d4751ac
commit 522a8fc330

View file

@ -78,7 +78,10 @@ void idAnimState::Save( idSaveGame *savefile ) const {
savefile->WriteObject( self );
// Save the entity owner of the animator
savefile->WriteObject( animator->GetEntity() );
if(animator != NULL) // DG: don't crash if it's NULL
savefile->WriteObject( animator->GetEntity() );
else
savefile->WriteInt(0);
savefile->WriteObject( thread );