--- linuxsampler/trunk/src/linuxsampler.cpp 2007/05/29 23:59:36 1212 +++ linuxsampler/trunk/src/linuxsampler.cpp 2007/06/22 10:10:06 1248 @@ -182,11 +182,11 @@ switch (iSignal) { case SIGINT: { if (pthread_equal(pthread_self(), main_thread)) { - if (pLSCPServer) { - pLSCPServer->StopThread(); - delete pLSCPServer; - } + if (pLSCPServer) pLSCPServer->StopThread(); + // the delete order here is important: the Sampler + // destructor sends notifications to the lscpserver if (pSampler) delete pSampler; + if (pLSCPServer) delete pLSCPServer; #if HAVE_SQLITE3 InstrumentsDb::Destroy(); #endif