From c45b6a17f4c54f9d37af598949180960fc6e83f3 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sun, 8 Jun 2014 21:56:31 +0200 Subject: [PATCH] Don't crash when removing the plugin of the first tab. --HG-- branch : gsoc2014-dfighter --- code/studio/src/plugins/core/context_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/studio/src/plugins/core/context_manager.cpp b/code/studio/src/plugins/core/context_manager.cpp index 8355b5cb8..d81f62cf1 100644 --- a/code/studio/src/plugins/core/context_manager.cpp +++ b/code/studio/src/plugins/core/context_manager.cpp @@ -135,8 +135,8 @@ void ContextManager::removeContextObject(IContext *context) const int index = indexOf(context->id()); QWidget *widget = d->m_tabWidget->widget(index); - d->m_tabWidget->removeTab(index); d->m_contexts.remove(index); + d->m_tabWidget->removeTab(index); delete widget; }