Completion: Fix crash in CodeAssistant

Task-number: QTCREATORBUG-15020
Change-Id: I88f166250b89badde2162e14065adfca05573dc7
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
Robert Loehning
2015-09-04 15:41:28 +02:00
parent 43064aa505
commit fcd59af30f

View File

@@ -305,7 +305,7 @@ void CodeAssistantPrivate::proposalComputed()
{ {
// Since the request runner is a different thread, there's still a gap in which the queued // Since the request runner is a different thread, there's still a gap in which the queued
// signal could be processed after an invalidation of the current request. // signal could be processed after an invalidation of the current request.
if (m_requestRunner != sender()) if (!m_requestRunner || m_requestRunner != sender())
return; return;
IAssistProposal *newProposal = m_requestRunner->proposal(); IAssistProposal *newProposal = m_requestRunner->proposal();