Fix crash for secondary application.

This commit is contained in:
Julien Wadel 2024-10-02 17:31:06 +02:00
parent 39473a8e00
commit 2a2f495053

View file

@ -601,9 +601,11 @@ void App::initCppInterfaces() {
//------------------------------------------------------------
void App::clean() {
mEngine->clearComponentCache();
mEngine->clearSingletons();
delete mEngine;
if (mEngine) {
mEngine->clearComponentCache();
mEngine->clearSingletons();
delete mEngine;
}
mEngine = nullptr;
// Wait 500ms to let time for log te be stored.
// mNotifier destroyed in mEngine deletion as it is its parent