[Scummvm-git-logs] scummvm master -> bf8aa5c5b8921a87bc26c807ef1b52fa9421e980

aquadran noreply at scummvm.org
Wed Oct 26 23:02:37 UTC 2022


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
bf8aa5c5b8 GRAPHICS: TINYGL: Added missing framebuffer class de-allocation


Commit: bf8aa5c5b8921a87bc26c807ef1b52fa9421e980
    https://github.com/scummvm/scummvm/commit/bf8aa5c5b8921a87bc26c807ef1b52fa9421e980
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2022-10-27T01:02:32+02:00

Commit Message:
GRAPHICS: TINYGL: Added missing framebuffer class de-allocation

Changed paths:
    graphics/tinygl/init.cpp
    graphics/tinygl/zbuffer.cpp


diff --git a/graphics/tinygl/init.cpp b/graphics/tinygl/init.cpp
index b8d4f18c75c..6da5037c897 100644
--- a/graphics/tinygl/init.cpp
+++ b/graphics/tinygl/init.cpp
@@ -293,6 +293,7 @@ void GLContext::deinit() {
 		gl_free(matrix_stack[i]);
 	endSharedState();
 	gl_free(vertex);
+	delete fb;
 }
 
 } // end of namespace TinyGL
diff --git a/graphics/tinygl/zbuffer.cpp b/graphics/tinygl/zbuffer.cpp
index 86e18ad2935..953c7843d17 100644
--- a/graphics/tinygl/zbuffer.cpp
+++ b/graphics/tinygl/zbuffer.cpp
@@ -90,6 +90,8 @@ FrameBuffer::FrameBuffer(int width, int height, const Graphics::PixelFormat &for
 	_zbuf = (uint *)gl_zalloc(_pbufWidth * _pbufHeight * sizeof(uint));
 	if (enableStencilBuffer)
 		_sbuf = (byte *)gl_zalloc(_pbufWidth * _pbufHeight * sizeof(byte));
+	else
+		_sbuf = nullptr;
 
 	_offscreenBuffer.pbuf = _pbuf.getRawBuffer();
 	_offscreenBuffer.zbuf = _zbuf;




More information about the Scummvm-git-logs mailing list