added freeing bitmap (potentially replaced after scaling up)
[rocksndiamonds.git] / src / libgame / system.c
index 12215ef9f0c130b0eaaf3ec357e8893e0173913f..a782ed8df7b9e152aeb46baf8378e647a5dd7737 100644 (file)
@@ -1479,6 +1479,9 @@ static void CreateScaledBitmaps(Bitmap **bitmaps, int zoom_factor,
 
     // set original bitmap pointer to corresponding sized bitmap
     bitmaps[IMG_BITMAP_PTR_ORIGINAL] = bitmaps[IMG_BITMAP_32x32];
+
+    if (old_bitmap != tmp_bitmap_1)
+      FreeBitmap(old_bitmap);
   }
 
   UPDATE_BUSY_STATE();