Skip to content

Commit

Permalink
Fix: missing null check in normal data assembler
Browse files Browse the repository at this point in the history
  • Loading branch information
gwaldron committed Feb 4, 2015
1 parent 00a5bd6 commit 4678b9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/osgEarthDrivers/engine_mp/TileModelFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ TileModelFactory::buildNormalMap(const TileKey& key,
// Make a new heightfield:
if (_normalHFCache->getOrCreateHeightField(frame, key, parentHF.get(), hf, isFallback, SAMPLE_FIRST_VALID, interp, progress))
{
if ( isFallback )
if ( isFallback && parentModel.valid() )
{
model->_normalData = parentModel->_normalData;
model->_normalData._fallbackData = true;
Expand Down Expand Up @@ -427,7 +427,7 @@ TileModelFactory::buildNormalMap(const TileKey& key,
}
}

if ( isFallback && parentModel )
if ( isFallback && parentModel.valid() )
{
model->_normalTexture = parentModel->_normalTexture.get();
}
Expand Down

0 comments on commit 4678b9f

Please sign in to comment.