--- linuxsampler/trunk/src/engines/InstrumentManagerThread.cpp 2012/03/04 09:01:40 2325 +++ linuxsampler/trunk/src/engines/InstrumentManagerThread.cpp 2012/03/08 19:40:14 2326 @@ -110,6 +110,10 @@ if (!empty) { cmd = queue.front(); queue.pop_front(); + + if (cmd.type == command_t::DIRECT_LOAD) { + EngineChannelFactory::SetDeleteEnabled(cmd.pEngineChannel, false); + } } mutex.Unlock(); if (empty) break; @@ -117,7 +121,6 @@ try { switch (cmd.type) { case command_t::DIRECT_LOAD: - EngineChannelFactory::SetDeleteEnabled(cmd.pEngineChannel, false); cmd.pEngineChannel->PrepareLoadInstrument(cmd.instrumentId.FileName.c_str(), cmd.instrumentId.Index); cmd.pEngineChannel->LoadInstrument(); EngineChannelFactory::SetDeleteEnabled(cmd.pEngineChannel, true);