Skip to content

Commit d5ed24a

Browse files
committed
Engine: Fix assert in initClone()
1 parent f0436e2 commit d5ed24a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/engine/internal/engine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ void Engine::initClone(Sprite *clone)
300300
#ifndef NDEBUG
301301
// Since we're initializing the clone, it shouldn't have any running scripts
302302
for (const auto script : m_runningScripts)
303-
assert(script->target() != clone);
303+
assert((script->target() != clone) || (std::find(m_scriptsToRemove.begin(), m_scriptsToRemove.end(), script.get()) != m_scriptsToRemove.end()));
304304
#endif
305305

306306
for (auto script : scripts) {

0 commit comments

Comments
 (0)