Skip to content

Commit

Permalink
Fixed P_DeleteViewModel when the viewmodel is NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
smallmodel committed Sep 27, 2023
1 parent 65ebdf0 commit 8c84872
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions code/fgame/weapturret.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1730,6 +1730,10 @@ void TurretGun::P_CreateViewModel(void)

void TurretGun::P_DeleteViewModel(void)
{
if (!m_pViewModel) {
return;
}

m_pViewModel->Delete();
m_pViewModel = NULL;

Expand Down

0 comments on commit 8c84872

Please sign in to comment.