summaryrefslogtreecommitdiff
path: root/src/plugins/debugger/breakwindow.cpp
diff options
context:
space:
mode:
authorAurindam Jana <aurindam.jana@nokia.com>2012-04-16 11:50:30 +0200
committerhjk <qthjk@ovi.com>2012-05-04 16:45:18 +0200
commit8ea32105fa8b6569a97fa2f85f3d67bc0e67ccd6 (patch)
tree50a7ebb4176e811470e8bb15b8c5ed4a6a0da3ad /src/plugins/debugger/breakwindow.cpp
parent5506d0329fbd08f336710aa1da699b268d34d4aa (diff)
downloadqt-creator-8ea32105fa8b6569a97fa2f85f3d67bc0e67ccd6.tar.gz
BreakHandler: DebuggerEngine for breakpointId
Suppress ASSERT if id is invalid. This prevents printing <invalidBkpt> when adding the first breakpoint using the breakpoint dialog. Change-Id: I3c989981cdbac597e8f314c0146507e5bb6c797d Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'src/plugins/debugger/breakwindow.cpp')
-rw-r--r--src/plugins/debugger/breakwindow.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/plugins/debugger/breakwindow.cpp b/src/plugins/debugger/breakwindow.cpp
index bb06f4e2fb..b142b52b1d 100644
--- a/src/plugins/debugger/breakwindow.cpp
+++ b/src/plugins/debugger/breakwindow.cpp
@@ -101,13 +101,15 @@ BreakpointDialog::BreakpointDialog(BreakpointModelId id, QWidget *parent)
{
m_ui.setupUi(this);
m_ui.comboBoxType->setMaxVisibleItems(20);
- if (DebuggerEngine *engine = breakHandler()->engine(id)) {
- if (!engine->hasCapability(BreakConditionCapability))
- m_enabledParts &= ~ConditionPart;
- if (!engine->hasCapability(BreakModuleCapability))
- m_enabledParts &= ~ModulePart;
- if (!engine->hasCapability(TracePointCapability))
- m_enabledParts &= ~TracePointPart;
+ if (id.isValid()) {
+ if (DebuggerEngine *engine = breakHandler()->engine(id)) {
+ if (!engine->hasCapability(BreakConditionCapability))
+ m_enabledParts &= ~ConditionPart;
+ if (!engine->hasCapability(BreakModuleCapability))
+ m_enabledParts &= ~ModulePart;
+ if (!engine->hasCapability(TracePointCapability))
+ m_enabledParts &= ~TracePointPart;
+ }
}
// Match BreakpointType (omitting unknown type).
QStringList types;