From 9caf0210f930b0a3e10654f53c097675c4666aa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= Date: Mon, 5 Oct 2015 21:48:30 +0200 Subject: [PATCH] MediaLibrary: Fix a crash if the media library gets released without being initialized --- src/MediaLibrary.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/MediaLibrary.cpp b/src/MediaLibrary.cpp index 239fb32e1..9ac881820 100644 --- a/src/MediaLibrary.cpp +++ b/src/MediaLibrary.cpp @@ -59,7 +59,8 @@ MediaLibrary::~MediaLibrary() // with a log callback set will try to invoke it. // We manually call logUnset to ensure that the callback that is about to be deleted will // not be called anymore. - m_vlcInstance.logUnset(); + if ( m_vlcInstance.isValid() ) + m_vlcInstance.logUnset(); File::clear(); Folder::clear(); Label::clear(); -- GitLab