From b1ee76047a77b4d23295c3231df3b53b6f5e6a4b Mon Sep 17 00:00:00 2001
From: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Date: Tue, 1 Sep 2015 15:40:04 +0200
Subject: [PATCH] TextEditor: Destroy completion widget if editor is closed

Task-number: QTCREATORBUG-14991
Change-Id: I7a23d4bd3a9fd97838f21e964a17b091dc925175
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
---
 src/plugins/texteditor/codeassist/codeassistant.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/plugins/texteditor/codeassist/codeassistant.cpp b/src/plugins/texteditor/codeassist/codeassistant.cpp
index 8b4c5600dec..b7f6e405100 100644
--- a/src/plugins/texteditor/codeassist/codeassistant.cpp
+++ b/src/plugins/texteditor/codeassist/codeassistant.cpp
@@ -550,6 +550,7 @@ CodeAssistant::CodeAssistant() : d(new CodeAssistantPrivate(this))
 
 CodeAssistant::~CodeAssistant()
 {
+    destroyContext();
     delete d;
 }
 
-- 
GitLab