diff -r 883e91c086aa -r 48c22c726cf9 backupandrestore/backupengine/src/absession.cpp --- a/backupandrestore/backupengine/src/absession.cpp Tue Jul 06 15:13:34 2010 +0300 +++ b/backupandrestore/backupengine/src/absession.cpp Wed Aug 18 10:38:51 2010 +0300 @@ -148,7 +148,12 @@ iCallbackWatchdog = NULL; // Remove this session from the server's session map - Server().RemoveElement(iClientSID); + // Use dynamic_cast in case that ABServer is deconstructing + CABServer *pServer = dynamic_cast(const_cast(CSession2::Server())); + if(pServer) + { + pServer->RemoveElement(iClientSID); + } // Clear up any outstanding message HandleIPCClosingDownCallback(); @@ -159,7 +164,10 @@ // If the client has detached properly, they should // have done this - but just in case. //DoCancelWaitForCallback(); - Server().DropSession(); + if(pServer) + { + pServer->DropSession(); + } } void CABSession::CreateL()