aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/graphics.h
diff options
context:
space:
mode:
authorNicola Mettifogo2007-08-07 14:53:58 +0000
committerNicola Mettifogo2007-08-07 14:53:58 +0000
commitd30c3650a358e4e5ba8a548d4e218d7b49fba34a (patch)
treed0ad1727c50257b815cafe8cdeff69d55cb0f106 /engines/parallaction/graphics.h
parent66c0a57248d873f744ae928d28a7161fcf1d68f0 (diff)
downloadscummvm-rg350-d30c3650a358e4e5ba8a548d4e218d7b49fba34a.tar.gz
scummvm-rg350-d30c3650a358e4e5ba8a548d4e218d7b49fba34a.tar.bz2
scummvm-rg350-d30c3650a358e4e5ba8a548d4e218d7b49fba34a.zip
MaskBuffer and PathBuffer are now correctly freed before they are deallocated, and so is background Surface.
svn-id: r28483
Diffstat (limited to 'engines/parallaction/graphics.h')
-rw-r--r--engines/parallaction/graphics.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/engines/parallaction/graphics.h b/engines/parallaction/graphics.h
index 30c56689df..9f7d2ffd6d 100644
--- a/engines/parallaction/graphics.h
+++ b/engines/parallaction/graphics.h
@@ -156,11 +156,7 @@ struct MaskBuffer {
byte *data;
public:
- MaskBuffer() : w(0), internalWidth(0), h(0), data(0) {
- }
-
- ~MaskBuffer() {
- free();
+ MaskBuffer() : w(0), internalWidth(0), h(0), size(0), data(0) {
}
void create(uint16 width, uint16 height) {
@@ -174,6 +170,11 @@ public:
void free() {
if (data)
::free(data);
+ data = 0;
+ w = 0;
+ h = 0;
+ internalWidth = 0;
+ size = 0;
}
inline byte getValue(uint16 x, uint16 y) {