mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-27 22:50:22 -04: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) {
|
if (!currentBlockId) {
|
||||||
// A "null block" - empty branch.
|
// A "null block" - empty branch.
|
||||||
thread.popStack();
|
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.
|
// Save the current block ID to notice if we did control flow.
|
||||||
while ((currentBlockId = thread.peekStack())) {
|
while ((currentBlockId = thread.peekStack())) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue