Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Memory leak was in last commit.

  • Loading branch information...
commit debb111a52af9a4d0d7690dcd50add13b9d22edc 1 parent 87515ab
tux authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 Shikoba.cpp
View
8 Shikoba.cpp
@@ -188,7 +188,9 @@ GLboolean Library::expandTexture() {
e = glGetError();
if(e)
_errorString = "Could not format texture.\n";
-
+
+ delete [] data;
+
glGetTexLevelParameteriv(GL_TEXTURE_RECTANGLE, 0, GL_TEXTURE_WIDTH, &_texture_width);
glGetTexLevelParameteriv(GL_TEXTURE_RECTANGLE, 0, GL_TEXTURE_HEIGHT, &_texture_height);
@@ -216,7 +218,9 @@ GLboolean Library::expandTexture() {
glTexImage2D(GL_TEXTURE_RECTANGLE, 0, GL_R8, _texture_width, _texture_height, 0, GL_RED, GL_UNSIGNED_BYTE, data);
glTexSubImage2D(GL_TEXTURE_RECTANGLE, 0, 0, 0, _texture_width, th, GL_RED, GL_UNSIGNED_BYTE, cbuf);
-
+
+ delete [] data;
+
glGetTexLevelParameteriv(GL_TEXTURE_RECTANGLE, 0, GL_TEXTURE_WIDTH, &_texture_width);
glGetTexLevelParameteriv(GL_TEXTURE_RECTANGLE, 0, GL_TEXTURE_HEIGHT, &_texture_height);
Please sign in to comment.
Something went wrong with that request. Please try again.