Don't crash when removing the plugin of the first tab.

--HG--
branch : gsoc2014-dfighter
hg/feature/cdb-packed
dfighter1985 11 years ago
parent 0096ad1204
commit c45b6a17f4

@ -135,8 +135,8 @@ void ContextManager::removeContextObject(IContext *context)
const int index = indexOf(context->id()); const int index = indexOf(context->id());
QWidget *widget = d->m_tabWidget->widget(index); QWidget *widget = d->m_tabWidget->widget(index);
d->m_tabWidget->removeTab(index);
d->m_contexts.remove(index); d->m_contexts.remove(index);
d->m_tabWidget->removeTab(index);
delete widget; delete widget;
} }

Loading…
Cancel
Save