Fix a memory leak in projectm when using the non-FBO fallback on Windows Vista. Fixes issue #846

This commit is contained in:
David Sansome 2010-10-04 23:03:13 +00:00
parent 317e957c64
commit c268f60339
2 changed files with 21 additions and 1 deletions

View File

@ -187,7 +187,10 @@ RenderTarget::RenderTarget(int texsize, int width, int height) : useFBO(false) {
{
int mindim = width < height ? width : height;
int origtexsize = this->texsize;
this->texsize = nearestPower2( mindim, SCALE_MINIFY );
this->texsize = nearestPower2( mindim, SCALE_MINIFY );
if (origtexsize == texsize)
return;
/* Create the texture that will be bound to the render this */
/*

View File

@ -0,0 +1,17 @@
Index: Renderer/FBO.cpp
===================================================================
--- Renderer/FBO.cpp (revision 2090)
+++ Renderer/FBO.cpp (working copy)
@@ -187,8 +187,11 @@
{
int mindim = width < height ? width : height;
int origtexsize = this->texsize;
- this->texsize = nearestPower2( mindim, SCALE_MINIFY );
+ this->texsize = nearestPower2( mindim, SCALE_MINIFY );
+ if (origtexsize == texsize)
+ return;
+
/* Create the texture that will be bound to the render this */
/*