diff options
author | Nicola Mettifogo | 2007-03-29 18:34:31 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2007-03-29 18:34:31 +0000 |
commit | 711865ef635cecac9d425976e0f0407ca137f4e5 (patch) | |
tree | 1cce36663d243b918095746a4cb5f27fa62415ff /engines/parallaction/defs.h | |
parent | 623ca8802269914ab90a1127f89c66dd2cb571f1 (diff) | |
download | scummvm-rg350-711865ef635cecac9d425976e0f0407ca137f4e5.tar.gz scummvm-rg350-711865ef635cecac9d425976e0f0407ca137f4e5.tar.bz2 scummvm-rg350-711865ef635cecac9d425976e0f0407ca137f4e5.zip |
- implemented destructor for Cnv, thus removing calls to Gfx::freeCnv()
- enforced use of getFramePtr instead of Cnv::_array member
svn-id: r26317
Diffstat (limited to 'engines/parallaction/defs.h')
-rw-r--r-- | engines/parallaction/defs.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/engines/parallaction/defs.h b/engines/parallaction/defs.h index f5325c760d..d2c1efdf1f 100644 --- a/engines/parallaction/defs.h +++ b/engines/parallaction/defs.h @@ -101,6 +101,17 @@ public: _array = NULL; } + ~Cnv() { + if (_count == 0 || _array == NULL) return; + + for (uint16 _si = 0; _si < _count; _si++) { + if (_array[_si]) + free(_array[_si]); + } + + free(_array); + } + byte* getFramePtr(uint16 index) { if (index >= _count) return NULL; |