diff options
Diffstat (limited to 'engines/parallaction/parser_ns.cpp')
-rw-r--r-- | engines/parallaction/parser_ns.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/parallaction/parser_ns.cpp b/engines/parallaction/parser_ns.cpp index 1b66394abf..c654e3008e 100644 --- a/engines/parallaction/parser_ns.cpp +++ b/engines/parallaction/parser_ns.cpp @@ -308,8 +308,6 @@ void LocationParser_ns::parseAnimation(AnimationList &list, char *name) { void ProgramParser_ns::parseInstruction() { - InstructionPtr inst(new Instruction); - _script->readLineToken(true); if (_tokens[0][1] == '.') { @@ -322,10 +320,13 @@ void ProgramParser_ns::parseInstruction() { } else ctxt.a = _program->_anim; - ctxt.inst = inst; + if (!ctxt.a) { + return; + } + InstructionPtr inst(new Instruction); + ctxt.inst = inst; _parser->parseStatement(); - _program->_instructions.push_back(inst); return; |