Another crash fix for land record without data

This commit is contained in:
scrawl 2015-03-02 22:23:00 +01:00
parent 8eb1f4e70e
commit f6509fe53e
2 changed files with 2 additions and 2 deletions

View file

@ -78,7 +78,7 @@ CSVRender::Cell::Cell (CSMWorld::Data& data, Ogre::SceneManager *sceneManager,
if (landIndex != -1)
{
const ESM::Land* esmLand = land.getRecord(mId).get().mLand.get();
if(esmLand)
if(esmLand && esmLand->mDataTypes&ESM::Land::DATA_VHGT)
{
mTerrain.reset(new Terrain::TerrainGrid(sceneManager, new TerrainStorage(mData), Element_Terrain, true,
Terrain::Align_XY));