Commit 2aef03a2 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix geometrywidget crash on exit

svn path=/trunk/kdenlive/; revision=4735
parent 54fd7b3f
......@@ -466,21 +466,32 @@ MainWindow::MainWindow(const QString &MltPath, const KUrl & Url, QWidget *parent
m_projectListDock->raise();
}
void MainWindow::queryQuit()
MainWindow::~MainWindow()
{
if (queryClose()) {
if (m_projectMonitor) m_projectMonitor->stop();
if (m_clipMonitor) m_clipMonitor->stop();
delete m_activeTimeline;
m_effectStack->slotClipItemSelected(NULL, 0);
m_transitionConfig->slotTransitionItemSelected(NULL, 0, QPoint(), false);
if (m_projectMonitor) m_projectMonitor->stop();
if (m_clipMonitor) m_clipMonitor->stop();
if (m_activeTimeline) delete m_activeTimeline;
delete m_effectStack;
delete m_transitionConfig;
if (m_activeDocument) delete m_activeDocument;
#ifndef Q_WS_MAC
// This sometimes causes crash on exit on OS X for some reason.
delete m_projectMonitor;
delete m_clipMonitor;
// This sometimes causes crash on exit on OS X for some reason.
delete m_projectMonitor;
delete m_clipMonitor;
#endif
delete m_effectStack;
delete m_activeDocument;
delete m_shortcutRemoveFocus;
Mlt::Factory::close();
delete m_shortcutRemoveFocus;
Mlt::Factory::close();
}
void MainWindow::queryQuit()
{
if (queryClose()) {
kapp->quit();
}
}
......
......@@ -83,6 +83,7 @@ public:
* a default new file will be created. */
explicit MainWindow(const QString &MltPath = QString(),
const KUrl &Url = KUrl(), QWidget *parent = 0);
virtual ~MainWindow();
/** @brief Locates the MLT environment.
* @param mltPath (optional) path to MLT environment
......
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