mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-05-16 08:20:56 -04:00
Fix to check if block still exists
This commit is contained in:
parent
9e55abc3b8
commit
5f5fe6fafd
3 changed files with 5 additions and 5 deletions
|
@ -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
2
vm.js
|
@ -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
6
vm.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue