Fix to check if block still exists

This commit is contained in:
Tim Mickel 2016-05-03 14:35:02 -04:00
parent 9e55abc3b8
commit 5f5fe6fafd
3 changed files with 5 additions and 5 deletions

View file

@ -97,7 +97,7 @@ Sequencer.prototype.stepThread = function (thread) {
// If the primitive would like to do control flow,
// it can overwrite nextBlock.
var currentBlock = thread.nextBlock;
if (!currentBlock) {
if (!currentBlock || !this.runtime.blocks[currentBlock]) {
thread.status = Thread.STATUS_DONE;
return;
}

2
vm.js
View file

@ -1662,7 +1662,7 @@
// If the primitive would like to do control flow,
// it can overwrite nextBlock.
var currentBlock = thread.nextBlock;
if (!currentBlock) {
if (!currentBlock || !this.runtime.blocks[currentBlock]) {
thread.status = Thread.STATUS_DONE;
return;
}

6
vm.min.js vendored

File diff suppressed because one or more lines are too long