Skip to content

Commit f7b6f13

Browse files
committed
Engine: Ignore missing backdrops in addBackdropChangeScript()
1 parent 24e3067 commit f7b6f13

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/engine/internal/engine.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,6 +1113,10 @@ void Engine::addBackdropChangeScript(std::shared_ptr<Block> hatBlock, int fieldI
11131113
assert(hatBlock->fieldAt(0));
11141114
const std::string &backdropName = hatBlock->fieldAt(0)->value().toString();
11151115
auto backdrop = stage->costumeAt(stage->findCostume(backdropName));
1116+
1117+
if (!backdrop)
1118+
return;
1119+
11161120
Broadcast *broadcast = backdrop->broadcast();
11171121
assert(broadcast->isBackdropBroadcast());
11181122

0 commit comments

Comments
 (0)