Skip to content

Commit 35b5ccd

Browse files
committed
fixed crash on close app
1 parent 5a48cf5 commit 35b5ccd

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

framework/global/internal/baseapplication.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,8 +382,9 @@ void BaseApplication::destroyContext(const modularity::ContextPtr& ctx)
382382

383383
void BaseApplication::doDestroyContext(const ContextData& data)
384384
{
385-
for (modularity::IContextSetup* s : data.setups) {
386-
s->onDeinit();
385+
// Deinit in reverse of init order
386+
for (auto it = data.setups.rbegin(); it != data.setups.rend(); ++it) {
387+
(*it)->onDeinit();
387388
}
388389

389390
qDeleteAll(data.setups);

0 commit comments

Comments
 (0)