diff --git a/Source/Render/sokol/SokolRenderTexture.cpp b/Source/Render/sokol/SokolRenderTexture.cpp index fcdd801e..31b79428 100644 --- a/Source/Render/sokol/SokolRenderTexture.cpp +++ b/Source/Render/sokol/SokolRenderTexture.cpp @@ -41,10 +41,7 @@ int cSokolRender::CreateTexture(cTexture* Texture, cFileImage* FileImage, bool e img = new SokolTexture2D(desc); } else { desc->usage = SG_USAGE_IMMUTABLE; - std::vector buffers; - uint8_t* buf = new uint8_t[tex_len]; - buffers.push_back(buf); memset(buf, 0xFF, tex_len); //Load in RGBA FileImage->GetTextureRGB(buf, i * Texture->GetTimePerFrame(), 4, 4 * dx, @@ -91,7 +88,6 @@ int cSokolRender::CreateTexture(cTexture* Texture, cFileImage* FileImage, bool e int mmh = dy >> nMipMap; size_t bufNextLen = mmw * mmh * 4; uint8_t *bufNext = new uint8_t[bufNextLen]; - buffers.push_back(bufNext); BuildMipMap(mmw, mmh, 4, 8 * mmw, buf, 4 * mmw, bufNext, 8, 8, 8, 8, diff --git a/Source/Render/sokol/SokolResources.h b/Source/Render/sokol/SokolResources.h index 483f3c74..ca3f7bdd 100644 --- a/Source/Render/sokol/SokolResources.h +++ b/Source/Render/sokol/SokolResources.h @@ -49,6 +49,7 @@ class SokolResource { if (refcount == 0) { destroy_res(); delete this; + return 0; } } return refcount;