summaryrefslogtreecommitdiff
path: root/src/render/modernopenglgraphics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/modernopenglgraphics.cpp')
-rw-r--r--src/render/modernopenglgraphics.cpp4
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);