diff options
author | David Schulz <[email protected]> | 2019-10-17 14:10:32 +0200 |
---|---|---|
committer | David Schulz <[email protected]> | 2019-10-17 13:04:20 +0000 |
commit | cc1399a4b672aa4b9679b1febff3c8c762842612 (patch) | |
tree | d6727421ef86e16dd5f372a1e02a056de5b2bde0 /src/plugins/debugger/breakhandler.cpp | |
parent | 418c7d108ac2324d1a10c7f769618eecae01f399 (diff) |
Debugger: Fix crash after breakpoint marker drag&drop
The updateMarker function deletes the marker of the global breakpoint so
don't call that function from the marker.
Fixes: QTCREATORBUG-23107
Change-Id: I377608f1a08b61451be1fc0be5bc15252252a4a7
Reviewed-by: hjk <[email protected]>
Diffstat (limited to 'src/plugins/debugger/breakhandler.cpp')
-rw-r--r-- | src/plugins/debugger/breakhandler.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp index 8befb49f8e0..4beee1d5a64 100644 --- a/src/plugins/debugger/breakhandler.cpp +++ b/src/plugins/debugger/breakhandler.cpp @@ -170,7 +170,6 @@ public: // the next line that generated code. m_gbp->m_params.lineNumber = lineNumber; - m_gbp->updateMarker(); m_gbp->update(); } @@ -186,14 +185,11 @@ public: void dragToLine(int line) final { + TextMark::move(line); QTC_ASSERT(m_gbp, return); QTC_ASSERT(BreakpointManager::globalBreakpoints().contains(m_gbp), return); - BreakpointParameters params = m_gbp->m_params; - params.lineNumber = line; - GlobalBreakpoint gbp = m_gbp; - m_gbp = GlobalBreakpoint(); - gbp->deleteBreakpoint(); - m_gbp = BreakpointManager::createBreakpoint(params); + m_gbp->m_params.lineNumber = line; + m_gbp->update(); } bool isClickable() const final { return true; } |