summaryrefslogtreecommitdiff
path: root/src/client/tile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/tile.cpp')
-rw-r--r--src/client/tile.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/client/tile.cpp b/src/client/tile.cpp
index d03588b2b..37836d0df 100644
--- a/src/client/tile.cpp
+++ b/src/client/tile.cpp
@@ -1633,6 +1633,13 @@ bool TextureSource::generateImagePart(std::string part_of_name,
/* IMPORTANT: When changing this, getTextureForMesh() needs to be
* updated too. */
+ if (!baseimg) {
+ errorstream << "generateImagePart(): baseimg == NULL "
+ << "for part_of_name=\"" << part_of_name
+ << "\", cancelling." << std::endl;
+ return false;
+ }
+
// Apply the "clean transparent" filter, if configured.
if (g_settings->getBool("texture_clean_transparent"))
imageCleanTransparent(baseimg, 127);