diff --git a/src/plugins/cppeditor/cpptoolsreuse.cpp b/src/plugins/cppeditor/cpptoolsreuse.cpp index 06bf220382a..fa1df1e6fe7 100644 --- a/src/plugins/cppeditor/cpptoolsreuse.cpp +++ b/src/plugins/cppeditor/cpptoolsreuse.cpp @@ -782,6 +782,7 @@ SearchResultItems symbolOccurrencesInDeclarationComments( QList symbolOccurrencesInText(const QTextDocument &doc, QStringView text, int offset, const QString &symbolName) { + QTC_ASSERT(!symbolName.isEmpty(), return QList()); QList ranges; int index = 0; while (true) {