aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorThomas Fach-Pedersen2016-10-24 19:05:50 +0200
committerThomas Fach-Pedersen2016-10-24 19:40:18 +0200
commitc64767b202f9264447829ac827fc5207c36d8978 (patch)
treeb57499dec0a2cc84f7411a4e5c5a97a6758481d1 /engines
parentec880c549a65a18101bff9ba0620796699d94249 (diff)
downloadscummvm-rg350-c64767b202f9264447829ac827fc5207c36d8978.tar.gz
scummvm-rg350-c64767b202f9264447829ac827fc5207c36d8978.tar.bz2
scummvm-rg350-c64767b202f9264447829ac827fc5207c36d8978.zip
BLADERUNNER: Fix null pointer dereference (CID 1364205)
Diffstat (limited to 'engines')
-rw-r--r--engines/bladerunner/set_effects.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/engines/bladerunner/set_effects.cpp b/engines/bladerunner/set_effects.cpp
index 8954b6f5db..f0a0ed5bd0 100644
--- a/engines/bladerunner/set_effects.cpp
+++ b/engines/bladerunner/set_effects.cpp
@@ -77,18 +77,16 @@ void SetEffects::read(Common::ReadStream *stream, int framesCount) {
}
void SetEffects::reset() {
- Fog *fog, *nextFog;
+ Fog *nextFog;
if (!_fogs)
return;
do {
- fog = _fogs;
- nextFog = fog->_next;
- delete fog;
- fog = nextFog;
+ nextFog = _fogs->_next;
+ delete this->_fogs;
+ this->_fogs = nextFog;
} while (nextFog);
-
}
void SetEffects::setupFrame(int frame) {