From dda67753250c57c85b3f005aa27c28117555aadd Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 1 Dec 2020 08:11:07 +0100 Subject: [PATCH] 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 --- src/plugins/debugger/debuggerprotocol.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/debugger/debuggerprotocol.cpp b/src/plugins/debugger/debuggerprotocol.cpp index 30250f27d76..8a751aa4879 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 '{':