forked from qt-creator/qt-creator
C++: fix crash when failing to open non-existing file.
Change-Id: Ie7bd3b36139ab7fac1186cefa7222dff7277eb53 Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
committed by
Nikolai Kosjar
parent
2ddb726dd5
commit
feff33827c
@@ -562,9 +562,13 @@ CPPEditorWidget::CPPEditorWidget(QWidget *parent)
|
||||
|
||||
CPPEditorWidget::~CPPEditorWidget()
|
||||
{
|
||||
if (m_modelManager)
|
||||
m_modelManager->deleteEditorSupport(editor());
|
||||
|
||||
++numberOfClosedEditors;
|
||||
if (numberOfClosedEditors == 5) {
|
||||
m_modelManager->GC();
|
||||
if (m_modelManager)
|
||||
m_modelManager->GC();
|
||||
numberOfClosedEditors = 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user