Correctly deal with empty substacks.
The stack needs to be popped in this situation.
This commit is contained in:
1 parent
559a2a0fab
commit
7cc0c00da6
1 file changed
+3
-1
@@ -81,7 +81,9 @@ Sequencer.prototype.stepThreads = function (threads) {
|
||||
*/
|
||||
Sequencer.prototype.startThread = function (thread) {
|
||||
var currentBlockId = thread.peekStack();
|
||||
if (!currentBlockId || !this.runtime.blocks.getBlock(currentBlockId)) {
|
||||
if (!currentBlockId) {
|
||||
// A "null block" - empty substack. Pop the stack.
|
||||
thread.popStack();
|
||||
thread.status = Thread.STATUS_DONE;
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user