diff --git a/src/plugins/clangcodemodel/semanticmarker.cpp b/src/plugins/clangcodemodel/semanticmarker.cpp index 71a5abc03d6..cb5d0b71f43 100644 --- a/src/plugins/clangcodemodel/semanticmarker.cpp +++ b/src/plugins/clangcodemodel/semanticmarker.cpp @@ -333,9 +333,8 @@ QList SemanticMarker::sourceMarkersInRange(unsigned firstLine, unsigned lastLine) { QList result; - QTC_ASSERT(m_unit, return result); - if (!m_unit->isLoaded()) + if (!m_unit || !m_unit->isLoaded()) return result; // Highlighting called asynchronously, and a few lines at the end can be deleted for this time.