mirror of
https://github.com/glest/glest-source.git
synced 2025-08-27 01:44:23 +02:00
Fixed potential null reference
This commit is contained in:
@@ -556,7 +556,7 @@ namespace Glest {
|
|||||||
Texture2D *
|
Texture2D *
|
||||||
tex = intoTexList[i];
|
tex = intoTexList[i];
|
||||||
//printf("tex # %d [%s]\n",i,tex->getPath().c_str());
|
//printf("tex # %d [%s]\n",i,tex->getPath().c_str());
|
||||||
|
if (tex != NULL) {
|
||||||
Vec2i texPlacement;
|
Vec2i texPlacement;
|
||||||
if (i == 0 || i % 9 == 0) {
|
if (i == 0 || i % 9 == 0) {
|
||||||
texPlacement = Vec2i(1, h - tex->getTextureHeight());
|
texPlacement = Vec2i(1, h - tex->getTextureHeight());
|
||||||
@@ -600,6 +600,7 @@ namespace Glest {
|
|||||||
(showMiscTime * (i + 1))));
|
(showMiscTime * (i + 1))));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (GlobalStaticFlags::getIsNonGraphicalModeEnabled() == false) {
|
if (GlobalStaticFlags::getIsNonGraphicalModeEnabled() == false) {
|
||||||
renderer.swapBuffers();
|
renderer.swapBuffers();
|
||||||
|
Reference in New Issue
Block a user