GRIM: Fix a memory leak with tinygl bitmaps. Fixes #580

This commit is contained in:
Joel Teichroeb 2012-03-31 15:03:56 -07:00
parent 1d765d28b1
commit 7afd163b6e
2 changed files with 5 additions and 1 deletions

View file

@ -240,10 +240,10 @@ BitmapData::BitmapData() :
BitmapData::~BitmapData() {
_keepData = false;
freeData();
if (_loaded) {
g_driver->destroyBitmap(this);
}
freeData();
if (_bitmaps) {
if (_bitmaps->contains(_fname)) {
_bitmaps->erase(_fname);