diff --git a/server/gameserver/room.cc b/server/gameserver/room.cc index c6c1082..44409ba 100644 --- a/server/gameserver/room.cc +++ b/server/gameserver/room.cc @@ -292,6 +292,7 @@ void Room::CreateThings() if (thing_tpl.i->weight() >= rand() % 10000) { int thing_id = thing_tpl.RandThing(); MetaData::MapThing* thing_meta = MetaMgr::Instance()->GetMapThing(thing_id); + assert(thing_meta); if (thing_meta) { if (thing_meta->i->is_house()) { CreateBuilding(thing_id, thing_tpl.i->x(), thing_tpl.i->y()); @@ -424,6 +425,7 @@ Obstacle* Room::CreateObstacle(int id, float x, float y) [] (Obstacle*) { }); + assert(entity); if (entity) { entity->BroadcastFullState(); }