Fix possible crash on document close:

http://www.kdenlive.org:80/mantis/view.php?id=880

svn path=/trunk/kdenlive/; revision=3465
parent 78c81041
......@@ -1261,6 +1261,7 @@ void MainWindow::closeCurrentDocument()
break;
case KMessageBox::Cancel :
return;
break;
default:
break;
}
......@@ -1270,13 +1271,16 @@ void MainWindow::closeCurrentDocument()
m_timelineArea->setTabBarHidden(true);
m_closeAction->setEnabled(false);
}
delete docToClose;
delete w;
if (m_timelineArea->count() == 0) {
if (docToClose == m_activeDocument) {
delete m_activeDocument;
m_activeDocument = NULL;
m_effectStack->clear();
m_transitionConfig->slotTransitionItemSelected(NULL, false);
}
} else delete docToClose;
if (w == m_activeTimeline) {
delete m_activeTimeline;
m_activeTimeline = NULL;
} else delete w;
}
bool MainWindow::saveFileAs(const QString &outputFileName)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment