aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-08-12 17:17:47 +0300
committerPerttu Ahola <celeron55@gmail.com>2011-08-12 17:17:47 +0300
commit835d2e4b5f92a5f9891fce8f958a4985cc53f1cf (patch)
tree8ef025b53c8e9b2830fea69bc03faeab93c0185e
parente40da2341cfcd6580075571d325105b9a9fe783a (diff)
downloadminetest-835d2e4b5f92a5f9891fce8f958a4985cc53f1cf.tar.gz
minetest-835d2e4b5f92a5f9891fce8f958a4985cc53f1cf.tar.bz2
minetest-835d2e4b5f92a5f9891fce8f958a4985cc53f1cf.zip
Removed assert if creating texture atlas image fails; cancel creating image instead.
-rw-r--r--src/tile.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/tile.cpp b/src/tile.cpp
index 9f6a6eb72..c93c0680b 100644
--- a/src/tile.cpp
+++ b/src/tile.cpp
@@ -495,7 +495,13 @@ void TextureSource::buildMainAtlas()
core::dimension2d<u32> atlas_dim(1024,1024);
video::IImage *atlas_img =
driver->createImage(video::ECF_A8R8G8B8, atlas_dim);
- assert(atlas_img);
+ //assert(atlas_img);
+ if(atlas_img == NULL)
+ {
+ dstream<<"TextureSource::buildMainAtlas(): Failed to create atlas "
+ "image; not building texture atlas."<<std::endl;
+ return;
+ }
/*
A list of stuff to add. This should contain as much of the