Debugger: Fix write error on terminated GDB process

Stopping/Aborting the debugger popped an error message saying "An error
occurred when attempting to write to the process."

Change-Id: Iceb41ea6144cb4d5a6384862da5bf5638f78f519
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Orgad Shaneh
2023-02-26 23:44:51 +02:00
committed by Orgad Shaneh
parent 53ca84e286
commit 87c00b86db

View File

@@ -380,6 +380,10 @@ public:
void doShutdownEngine() void doShutdownEngine()
{ {
m_engine->setState(EngineShutdownRequested); m_engine->setState(EngineShutdownRequested);
if (m_engine->isDying()) {
m_engine->notifyEngineShutdownFinished();
return;
}
m_engine->startDying(); m_engine->startDying();
m_engine->showMessage("CALL: SHUTDOWN ENGINE"); m_engine->showMessage("CALL: SHUTDOWN ENGINE");
m_engine->shutdownEngine(); m_engine->shutdownEngine();