summaryrefslogtreecommitdiff
path: root/src/plugins/debugger/debuggerprotocol.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2020-12-01 08:11:07 +0100
committerhjk <hjk@qt.io>2020-12-01 10:03:17 +0000
commitdda67753250c57c85b3f005aa27c28117555aadd (patch)
treefed10f2d74e2e97632f2543603496cf090117b2d /src/plugins/debugger/debuggerprotocol.cpp
parent35380afb93c4899e4b265ce968cd727c8a46f906 (diff)
downloadqt-creator-dda67753250c57c85b3f005aa27c28117555aadd.tar.gz
Debugger: Fix crash in GdbMi::parseValue with Qt 6
QString::begin/end may be null in Qt 6. Fixes: QTCREATORBUG-25018 Change-Id: If50cb79c58096d5fa68e494e33bea131063968fb Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Diffstat (limited to 'src/plugins/debugger/debuggerprotocol.cpp')
-rw-r--r--src/plugins/debugger/debuggerprotocol.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/debugger/debuggerprotocol.cpp b/src/plugins/debugger/debuggerprotocol.cpp
index 30250f27d7..8a751aa487 100644
--- a/src/plugins/debugger/debuggerprotocol.cpp
+++ b/src/plugins/debugger/debuggerprotocol.cpp
@@ -198,6 +198,9 @@ QString GdbMi::parseCString(const QChar *&from, const QChar *to)
void GdbMi::parseValue(const QChar *&from, const QChar *to)
{
+ if (from == to)
+ return;
+
//qDebug() << "parseValue: " << QString(from, to - from);
switch (from->unicode()) {
case '{':