Commit 26be56d2 authored by Milian Wolff's avatar Milian Wolff

Don't crash when a context wasn't found properly

parent 225d73e8
......@@ -150,6 +150,8 @@ void executeCompletionTest(const ReferencedTopDUContext& top, const CompletionIt
CustomTestFunction customTestFunction = {})
{
DUChainReadLocker lock;
QVERIFY(top);
QVERIFY(top->ast());
const ParseSessionData::Ptr sessionData(dynamic_cast<ParseSessionData*>(top->ast().data()));
QVERIFY(sessionData);
lock.unlock();
......
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