summaryrefslogtreecommitdiff
path: root/src/plugins/debugger/breakhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/debugger/breakhandler.cpp')
-rw-r--r--src/plugins/debugger/breakhandler.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp
index 0bc771de6b..e80b898aae 100644
--- a/src/plugins/debugger/breakhandler.cpp
+++ b/src/plugins/debugger/breakhandler.cpp
@@ -396,7 +396,11 @@ void BreakHandler::loadBreakpoints()
v = map.value(_("message"));
if (v.isValid())
data.message = v.toString();
- appendBreakpoint(data);
+ if (data.isValid()) {
+ appendBreakpoint(data);
+ } else {
+ qWarning("Not restoring invalid breakpoint: %s", qPrintable(data.toString()));
+ }
}
//qDebug() << "LOADED BREAKPOINTS" << this << list.size();
}
@@ -1036,7 +1040,11 @@ static int currentId = 0;
void BreakHandler::appendBreakpoint(const BreakpointParameters &data)
{
- QTC_ASSERT(data.type != UnknownType, return);
+ if (!data.isValid()) {
+ qWarning("Not adding invalid breakpoint: %s", qPrintable(data.toString()));
+ return;
+ }
+
BreakpointModelId id(++currentId);
const int row = m_storage.size();
beginInsertRows(QModelIndex(), row, row);