From 523b4045ccc90cadcf4e4d76ecfec526e61dc65d Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 1 Aug 2024 14:44:58 +0200 Subject: [PATCH] Debugger: Fix opening new memory views from within a memory view Change-Id: I2e1c1fac968a38e1c68c8055d9946238facb2c0b Reviewed-by: Christian Stenger Reviewed-by: hjk --- src/plugins/debugger/memoryagent.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/plugins/debugger/memoryagent.cpp b/src/plugins/debugger/memoryagent.cpp index 77430db88fe..94fbb114cee 100644 --- a/src/plugins/debugger/memoryagent.cpp +++ b/src/plugins/debugger/memoryagent.cpp @@ -215,9 +215,8 @@ MemoryAgent::MemoryAgent(const MemoryViewSetupData &data, DebuggerEngine *engine m_service->setNewWindowRequestHandler([this](quint64 address) { MemoryViewSetupData data; data.startAddress = address; - auto agent = new MemoryAgent(data, m_engine); - if (!agent->isUsable()) - delete agent; + data.separateView = true; + m_engine->openMemoryView(data); }); m_service->setDataChangedHandler([this](quint64 address, const QByteArray &data) {