RemoteVstPlugin: workaround for early host callbacks by some plugins

Some plugins call host callback from within their main function,
causing RemoteVstPlugin::m_plugin not to be set yet. Therefore
explicitely set RemoteVstPlugin::m_plugin if it's NULL. Makes plugins
by Wallander Instruments (and possibly others as well) work.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
(cherry picked from commit 38f7552ce4)
This commit is contained in:
Tobias Doerffel
2009-07-07 00:18:06 +02:00
parent 7ef61b04d7
commit 4e81299729

View File

@@ -927,6 +927,12 @@ VstIntPtr RemoteVstPlugin::hostCallback( AEffect * _effect, VstInt32 _opcode,
SHOW_CALLBACK( buf );
#endif
// workaround for early callbacks by some plugins
if( __plugin && __plugin->m_plugin == NULL )
{
__plugin->m_plugin = _effect;
}
switch( _opcode )
{
case audioMasterAutomate: