diff options
author | sfan5 <sfan5@live.de> | 2020-12-23 22:03:49 +0100 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2020-12-24 13:44:54 +0100 |
commit | 74762470b2aa11a5271b846549ff14b86c1705d2 (patch) | |
tree | cf4fd29ba05a94395674ac6cd5b2eeb7bdac0ee1 /src/client/tile.cpp | |
parent | 289425f6bd6cfe1f66218918d9d5bd1b9f89aa7c (diff) | |
download | minetest-74762470b2aa11a5271b846549ff14b86c1705d2.tar.gz minetest-74762470b2aa11a5271b846549ff14b86c1705d2.tar.bz2 minetest-74762470b2aa11a5271b846549ff14b86c1705d2.zip |
Fix some minor code issues all over the place
Diffstat (limited to 'src/client/tile.cpp')
-rw-r--r-- | src/client/tile.cpp | 7 |
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); |