Changed: Check getSpawn() before calling its methods

This commit is contained in:
kervala 2015-02-14 12:47:54 +01:00
parent a5d69a78d7
commit a6cd459f33

View file

@ -714,9 +714,12 @@ void CBotNpc::sendVPA() // alternate VPA
void CBotNpc::sendVisualProperties() // VisualPropertyA, B, C
{
CMirrors::setVisualPropertyA( getSpawn()->dataSetRow(), _VisualPropertyA );
CMirrors::setVisualPropertyB( getSpawn()->dataSetRow(), _VisualPropertyB );
CMirrors::setVisualPropertyC( getSpawn()->dataSetRow(), _VisualPropertyC );
if (getSpawn())
{
CMirrors::setVisualPropertyA( getSpawn()->dataSetRow(), _VisualPropertyA );
CMirrors::setVisualPropertyB( getSpawn()->dataSetRow(), _VisualPropertyB );
CMirrors::setVisualPropertyC( getSpawn()->dataSetRow(), _VisualPropertyC );
}
}
bool CBotNpc::reSpawn(bool sendMessage)