Commit 14b6e7b5 authored by Waqar Ahmed's avatar Waqar Ahmed
Browse files

Try prevent a crash

parent 06a41628
......@@ -2281,7 +2281,11 @@ public:
this,
SLOT(clearSemanticTokensHighlighting(KTextEditor::Document *)),
Qt::UniqueConnection);
connect(doc,
SIGNAL(aboutToClose(KTextEditor::Document *)),
this,
SLOT(clearSemanticTokensHighlighting(KTextEditor::Document *)),
Qt::UniqueConnection);
doSemanticHighlighting(activeView);
}
}
......
......@@ -17,7 +17,9 @@ void SemanticHighlighter::remove(const QUrl &url)
auto &movingRanges = it->movingRanges;
for (auto mr : movingRanges) {
delete mr;
mr = nullptr;
}
movingRanges.clear();
m_docSemanticInfo.remove(url);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment