diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-03-23 18:11:18 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-03-23 18:11:18 +0300 |
commit | 8748a2dd80559b770ccacb21268bc5a5164b5c26 (patch) | |
tree | 8286740f8786a70b9f7a2c225ad40cfe6f90344a | |
parent | d029995e218bcd49eef292fdfd4b12cd164d7b51 (diff) | |
download | manaverse-8748a2dd80559b770ccacb21268bc5a5164b5c26.tar.gz manaverse-8748a2dd80559b770ccacb21268bc5a5164b5c26.tar.bz2 manaverse-8748a2dd80559b770ccacb21268bc5a5164b5c26.tar.xz manaverse-8748a2dd80559b770ccacb21268bc5a5164b5c26.zip |
Fix leak on exit in modernopenglgraphics.
-rw-r--r-- | src/render/modernopenglgraphics.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/render/modernopenglgraphics.cpp b/src/render/modernopenglgraphics.cpp index 87145d673..04393eab6 100644 --- a/src/render/modernopenglgraphics.cpp +++ b/src/render/modernopenglgraphics.cpp @@ -38,6 +38,7 @@ #include "resources/imagerect.h" #include "resources/openglimagehelper.h" +#include "utils/delete2.h" #include "utils/sdlcheckutils.h" #include "utils/sdlhelper.h" @@ -120,8 +121,7 @@ ModernOpenGLGraphics::~ModernOpenGLGraphics() void ModernOpenGLGraphics::deleteGLObjects() { - if (mProgram) - mProgram->decRef(); + delete2(mProgram); if (mVbo) { // logger->log("delete buffer vbo: %u", mVbo); |