diff --git a/mp/src/game/server/ai_basenpc.cpp b/mp/src/game/server/ai_basenpc.cpp index 54b476360..468d983d3 100644 --- a/mp/src/game/server/ai_basenpc.cpp +++ b/mp/src/game/server/ai_basenpc.cpp @@ -3222,7 +3222,10 @@ void CAI_BaseNPC::UpdateEfficiency( bool bInPVS ) } } - iSound = pCurrentSound->NextSound(); + if (pCurrentSound) + iSound = pCurrentSound->NextSound(); + else + break; } } @@ -3409,7 +3412,10 @@ void CAI_BaseNPC::UpdateSleepState( bool bInPVS ) break; } - iSound = pCurrentSound->NextSound(); + if (pCurrentSound) + iSound = pCurrentSound->NextSound(); + else + break; } } }