diff options
author | Weblate <42@minetest.ru> | 2013-04-07 13:39:28 +0200 |
---|---|---|
committer | Weblate <42@minetest.ru> | 2013-04-07 13:39:28 +0200 |
commit | feb7de91ec34ef1ca3152270a7bc62b2e308f1bd (patch) | |
tree | 65c33378bae9b7ac565b979237b6d594b511171f /src/tile.cpp | |
parent | 33052abf42886ef03c4f46196cab6f767259a672 (diff) | |
parent | 4468ea84e6d0faede5a01e8d97d359c537aa7ec8 (diff) | |
download | minetest-feb7de91ec34ef1ca3152270a7bc62b2e308f1bd.tar.gz minetest-feb7de91ec34ef1ca3152270a7bc62b2e308f1bd.tar.bz2 minetest-feb7de91ec34ef1ca3152270a7bc62b2e308f1bd.zip |
Merge remote branch 'origin/master'
Diffstat (limited to 'src/tile.cpp')
-rw-r--r-- | src/tile.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tile.cpp b/src/tile.cpp index aea9665f5..c5e8a2a9d 100644 --- a/src/tile.cpp +++ b/src/tile.cpp @@ -826,7 +826,7 @@ void TextureSource::rebuildImagesAndTextures() video::ITexture *t = NULL; if(img) t = driver->addTexture(sap->name.c_str(), img); - + video::ITexture *t_old = sap->a.atlas; // Replace texture sap->a.atlas = t; sap->a.pos = v2f(0,0); @@ -835,6 +835,9 @@ void TextureSource::rebuildImagesAndTextures() sap->atlas_img = img; sap->intpos = v2s32(0,0); sap->intsize = img->getDimension(); + + if (t_old != 0) + driver->removeTexture(t_old); } } |