From: Jean-Baptiste Mardelle Date: Thu, 2 Jun 2011 10:12:01 +0000 (+0000) Subject: Fix crash after failed capture to decklink X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=2c5e0cb6f64609430c311ad850f0d9fda9ba9ae0;p=kdenlive Fix crash after failed capture to decklink svn path=/trunk/kdenlive/; revision=5629 --- diff --git a/src/mltdevicecapture.cpp b/src/mltdevicecapture.cpp index 22b4ab5b..8862d5cb 100644 --- a/src/mltdevicecapture.cpp +++ b/src/mltdevicecapture.cpp @@ -289,6 +289,10 @@ bool MltDeviceCapture::slotStartPreview(const QString &producer, bool xmlFormat) delete[] tmp; if (m_mltProducer == NULL || !m_mltProducer->is_valid()) { + if (m_mltProducer) { + delete m_mltProducer; + m_mltProducer = NULL; + } kDebug()<<"//// ERROR CREATRING PROD"; return false; }