Skip to content

Commit

Permalink
RemoteVstPlugin: close the plugin properly
Browse files Browse the repository at this point in the history
  • Loading branch information
grejppi committed Feb 23, 2014
1 parent 8b13820 commit 1e3dcde
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions plugins/vst_base/RemoteVstPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,15 @@ RemoteVstPlugin::RemoteVstPlugin( key_t _shm_in, key_t _shm_out ) :

RemoteVstPlugin::~RemoteVstPlugin()
{
if( m_window != NULL )
{
pluginDispatch( effEditClose );
#ifdef LMMS_BUILD_LINUX
CloseWindow( m_window );
#endif
m_window = NULL;
}
pluginDispatch( effMainsChanged, 0, 0 );
#ifndef USE_QT_SHMEM
// detach shared memory segment
if( shmdt( m_vstSyncData ) == -1)
Expand All @@ -433,14 +442,6 @@ RemoteVstPlugin::~RemoteVstPlugin()
}
}
#endif
if( m_window != NULL )
{
pluginDispatch( effEditClose );
#ifdef LMMS_BUILD_LINUX
CloseWindow( m_window );
#endif
m_window = NULL;
}

if( m_libInst != NULL )
{
Expand Down

0 comments on commit 1e3dcde

Please sign in to comment.