diff --git a/game/server/ai_basenpc.cpp b/game/server/ai_basenpc.cpp index 0acc458f..25fbc0c3 100644 --- a/game/server/ai_basenpc.cpp +++ b/game/server/ai_basenpc.cpp @@ -6560,6 +6560,12 @@ float CAI_BaseNPC::ThrowLimit( const Vector &vecStart, //----------------------------------------------------------------------------- void CAI_BaseNPC::SetupVPhysicsHull() { + if( GetModelPtr() == NULL ) + { + UTIL_Remove( this ); + return; + } + if ( GetMoveType() == MOVETYPE_VPHYSICS || GetMoveType() == MOVETYPE_NONE ) return; diff --git a/public/bone_setup.cpp b/public/bone_setup.cpp index 564f9ea6..8302b8f5 100644 --- a/public/bone_setup.cpp +++ b/public/bone_setup.cpp @@ -5943,6 +5943,8 @@ const char *Studio_GetDefaultSurfaceProps( CStudioHdr *pstudiohdr ) float Studio_GetMass( CStudioHdr *pstudiohdr ) { + if( pstudiohdr == NULL ) return 0.f; + return pstudiohdr->mass(); }