diff --git a/src/plugins/cppcheck/cppchecktrigger.cpp b/src/plugins/cppcheck/cppchecktrigger.cpp index b9ce34448c8..af6423765c7 100644 --- a/src/plugins/cppcheck/cppchecktrigger.cpp +++ b/src/plugins/cppcheck/cppchecktrigger.cpp @@ -89,7 +89,8 @@ void CppcheckTrigger::checkEditors(const QList &editors) const auto document = editor->document(); QTC_ASSERT(document, continue); const auto &path = document->filePath(); - QTC_ASSERT(!path.isEmpty(), continue); + if (path.isEmpty()) + continue; if (m_checkedFiles.contains(path)) continue;