diff --git a/src/game/server/physobj.cpp b/src/game/server/physobj.cpp index efaffd075..8810640cd 100644 --- a/src/game/server/physobj.cpp +++ b/src/game/server/physobj.cpp @@ -1559,11 +1559,24 @@ CPhysMagnet::~CPhysMagnet( void ) //----------------------------------------------------------------------------- void CPhysMagnet::Spawn( void ) { - Precache(); - SetMoveType( MOVETYPE_NONE ); SetSolid( SOLID_VPHYSICS ); - SetModel( STRING( GetModelName() ) ); + + char *szModel = ( char * ) STRING( GetModelName() ); + + if ( !szModel || !*szModel ) + { + Warning( "%s at %.0f, %.0f, %0.f missing modelname!\n", + GetClassname(), + GetAbsOrigin().x, + GetAbsOrigin().y, + GetAbsOrigin().z ); + UTIL_Remove( this ); + return; + } + + PrecacheModel( szModel ); + SetModel( szModel ); m_takedamage = DAMAGE_EVENTS_ONLY;