mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 06:52:40 -05:00
retire new threads if they have no block after the hat
This commit is contained in:
parent
6ed3263ca9
commit
ebdf3865d4
1 changed files with 6 additions and 0 deletions
|
@ -177,6 +177,12 @@ class Sequencer {
|
|||
if (!currentBlockId) {
|
||||
// A "null block" - empty branch.
|
||||
thread.popStack();
|
||||
|
||||
// Did the null follow a hat block?
|
||||
if (thread.stack.length === 0) {
|
||||
thread.status = Thread.STATUS_DONE;
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Save the current block ID to notice if we did control flow.
|
||||
while ((currentBlockId = thread.peekStack())) {
|
||||
|
|
Loading…
Reference in a new issue