1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

GCS - Fixed nasty memory leak

This commit is contained in:
PT_Dreamer 2012-08-01 14:41:00 +01:00
parent af98f4c2a6
commit 599d46b8fa

View File

@ -79,7 +79,9 @@ void MyTabbedStackWidget::insertTab(const int index, QWidget *tab, const QIcon &
void MyTabbedStackWidget::removeTab(int index)
{
m_stackWidget->removeWidget(m_stackWidget->widget(index));
QWidget * wid=m_stackWidget->widget(index);
m_stackWidget->removeWidget(wid);
delete wid;
QListWidgetItem *item = m_listWidget->item(index);
m_listWidget->removeItemWidget(item);
delete item;