summaryrefslogtreecommitdiff
path: root/src/render/mobileopenglgraphics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/mobileopenglgraphics.cpp')
-rw-r--r--src/render/mobileopenglgraphics.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/render/mobileopenglgraphics.cpp b/src/render/mobileopenglgraphics.cpp
index 91184958b..ce930f416 100644
--- a/src/render/mobileopenglgraphics.cpp
+++ b/src/render/mobileopenglgraphics.cpp
@@ -906,7 +906,7 @@ SDL_Surface* MobileOpenGLGraphics::getScreenshot()
SDL_LockSurface(screenshot);
const unsigned int lineSize = 3 * w;
- GLubyte *const buf = static_cast<GLubyte*>(malloc(lineSize));
+ GLubyte *const buf = new GLubyte[lineSize];
if (!buf)
return nullptr;
@@ -929,7 +929,7 @@ SDL_Surface* MobileOpenGLGraphics::getScreenshot()
memcpy(bot, buf, lineSize);
}
- free(buf);
+ delete [] buf;
if (config.getBoolValue("usefbo"))
graphicsManager.deleteFBO(&mFbo);