Commit 99d0b1dd authored by Nicolas Carion's avatar Nicolas Carion

add mutex protection to thumb profile access

parent 13326c99
......@@ -57,6 +57,7 @@ void Core::prepareShutdown()
Core::~Core()
{
qDebug() << "deleting core";
if (m_monitorManager) {
delete m_monitorManager;
}
......@@ -650,6 +651,7 @@ void Core::showClipKeyframes(ObjectId id, bool enable)
Mlt::Profile *Core::thumbProfile()
{
QMutexLocker lck(&m_thumbProfileMutex);
if (!m_thumbProfile) {
m_thumbProfile = std::make_unique<Mlt::Profile>(m_currentProfile.toStdString().c_str());
m_thumbProfile->set_height(200);
......
......@@ -14,6 +14,7 @@ the Free Software Foundation, either version 3 of the License, or
#include "definitions.h"
#include "kdenlivecore_export.h"
#include "undohelper.hpp"
#include <QMutex>
#include <QObject>
#include <QTabWidget>
#include <QUrl>
......@@ -217,6 +218,8 @@ private:
std::unique_ptr<MediaCapture> m_capture;
QUrl m_mediaCaptureFile;
QMutex m_thumbProfileMutex;
public slots:
void triggerAction(const QString &name);
/** @brief display a user info/warning message in the project bin */
......
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