Skip to content
Permalink
Browse files

fix sanity check

0 is a valid number.
instead, invoke the texture and check for a null pointer.
  • Loading branch information
Warboy1982 committed Oct 27, 2019
1 parent c1eb5aa commit acd36fa86b1f87907c38df4c8e2316bef28341eb
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/Geoscape/GeoscapeState.cpp
@@ -939,7 +939,7 @@ void GeoscapeState::time5Seconds()
// look up polygons texture
int texture, shade;
_globe->getPolygonTextureAndShade(m->getLongitude(), m->getLatitude(), &texture, &shade);
if (m->getTexture() != 0)
if (_game->getMod()->getGlobe()->getTexture(m->getTexture()) != 0)
{
texture = m->getTexture();
}

0 comments on commit acd36fa

Please sign in to comment.
You can’t perform that action at this time.