diff options
Diffstat (limited to 'engines/bladerunner/fog.cpp')
-rw-r--r-- | engines/bladerunner/fog.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/engines/bladerunner/fog.cpp b/engines/bladerunner/fog.cpp index dac7f29679..edebc9412f 100644 --- a/engines/bladerunner/fog.cpp +++ b/engines/bladerunner/fog.cpp @@ -47,6 +47,9 @@ Fog::Fog() { } Fog::~Fog() { + if (_animationData != nullptr) { + delete[] _animationData; + } } int Fog::readCommon(Common::ReadStream *stream) { @@ -64,6 +67,10 @@ int Fog::readCommon(Common::ReadStream *stream) { void Fog::readAnimationData(Common::ReadStream *stream, int size) { _animatedParameters = stream->readUint32LE(); + if (_animationData != nullptr) { + delete[] _animationData; + } + int floatCount = size / 4; _animationData = new float[floatCount]; for (int i = 0; i < floatCount; i++) { |