- fixed a small memory leak in the texture manager.

This commit is contained in:
Christoph Oelckers 2017-02-03 13:11:55 +01:00
parent 075cce98c4
commit 82eae78f7e
1 changed files with 10 additions and 2 deletions

View File

@ -592,8 +592,16 @@ bool FMaterial::TrimBorders(int *rect)
}
int size = w*h;
if (size == 1) return false;
if (size == 1)
{
// nothing to be done here.
rect[0] = 0;
rect[1] = 0;
rect[2] = 1;
rect[3] = 1;
delete[] buffer;
return true;
}
int first, last;
for(first = 0; first < size; first++)