diff options
author | Eugene Sandulenko | 2014-01-04 01:20:39 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2014-01-04 01:20:39 +0200 |
commit | 8725a3a6a67987fadd11e03d75a22845fd528c8c (patch) | |
tree | bdc06034c10ef086e4dd47898f20fba4af10024d | |
parent | 5b2acd514f5c8f83efdb61e84805d785bef0a9d2 (diff) | |
download | scummvm-rg350-8725a3a6a67987fadd11e03d75a22845fd528c8c.tar.gz scummvm-rg350-8725a3a6a67987fadd11e03d75a22845fd528c8c.tar.bz2 scummvm-rg350-8725a3a6a67987fadd11e03d75a22845fd528c8c.zip |
FULLPIPE: Fix crahs in Floaters::init()
-rw-r--r-- | engines/fullpipe/floaters.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/fullpipe/floaters.cpp b/engines/fullpipe/floaters.cpp index b405e331ff..c1c55fd50c 100644 --- a/engines/fullpipe/floaters.cpp +++ b/engines/fullpipe/floaters.cpp @@ -77,8 +77,12 @@ void Floaters::init(GameVar *var) { int idx = 0; while (sub) { - _array1[idx]->val1 = sub->_subVars->_value.intValue; - _array1[idx]->val2 = sub->_subVars->_nextVarObj->_value.intValue; + FloaterArray1 *f = new FloaterArray1; + + f->val1 = sub->_subVars->_value.intValue; + f->val2 = sub->_subVars->_nextVarObj->_value.intValue; + + _array1.push_back(f); idx++; sub = sub->_nextVarObj; |