From f44843d95cb7c874204724dd2e10d99c489cf24e Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Thu, 6 Feb 2014 20:58:30 +0100 Subject: [PATCH] VstEffect: added NULL pointer check in closePlugin() We must not call methods on m_plugin in case there's no valid instance e.g. due to missing DLL files. Closes #245. --- plugins/vst_effect/VstEffect.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/vst_effect/VstEffect.cpp b/plugins/vst_effect/VstEffect.cpp index a4215cc18..9676f83af 100644 --- a/plugins/vst_effect/VstEffect.cpp +++ b/plugins/vst_effect/VstEffect.cpp @@ -1,7 +1,7 @@ /* * VstEffect.cpp - class for handling VST effect plugins * - * Copyright (c) 2006-2010 Tobias Doerffel + * Copyright (c) 2006-2014 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -163,7 +163,7 @@ void VstEffect::openPlugin( const QString & _plugin ) void VstEffect::closePlugin() { m_pluginMutex.lock(); - if( m_plugin->pluginWidget() != NULL ) + if( m_plugin && m_plugin->pluginWidget() != NULL ) { delete m_plugin->pluginWidget(); }