forked from Mirrorlandia_minetest/minetest
src/client/tile.cpp: Fix reference counting
This commit is contained in:
parent
47225346be
commit
868a1a5c13
@ -1209,6 +1209,7 @@ bool TextureSource::generateImagePart(std::string part_of_name,
|
||||
s32 frame_count = stoi(sf.next(":"));
|
||||
s32 progression = stoi(sf.next(":"));
|
||||
|
||||
if (progression >= 0) {
|
||||
/*
|
||||
Load crack image.
|
||||
|
||||
@ -1218,14 +1219,14 @@ bool TextureSource::generateImagePart(std::string part_of_name,
|
||||
video::IImage *img_crack = m_sourcecache.getOrLoad(
|
||||
"crack_anylength.png", m_device);
|
||||
|
||||
if (img_crack && progression >= 0)
|
||||
{
|
||||
if (img_crack) {
|
||||
draw_crack(img_crack, baseimg,
|
||||
use_overlay, frame_count,
|
||||
progression, driver);
|
||||
img_crack->drop();
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
[combine:WxH:X,Y=filename:X,Y=filename2
|
||||
Creates a bigger texture from an amount of smaller ones
|
||||
@ -1612,6 +1613,7 @@ bool TextureSource::generateImagePart(std::string part_of_name,
|
||||
if (img) {
|
||||
apply_mask(img, baseimg, v2s32(0, 0), v2s32(0, 0),
|
||||
img->getDimension());
|
||||
img->drop();
|
||||
} else {
|
||||
errorstream << "generateImage(): Failed to load \""
|
||||
<< filename << "\".";
|
||||
|
Loading…
Reference in New Issue
Block a user