diff -r b6f55cd40afd -r f7fbeaeb166a bluetoothengine/btnotif/src/BTNAuthNotifier.cpp --- a/bluetoothengine/btnotif/src/BTNAuthNotifier.cpp Wed Mar 31 21:51:05 2010 +0300 +++ b/bluetoothengine/btnotif/src/BTNAuthNotifier.cpp Wed Apr 14 16:09:00 2010 +0300 @@ -22,7 +22,7 @@ #include "btNotifDebug.h" // Debugging macros #include #include // Cover UI -#include +#include #include #include #include @@ -156,7 +156,11 @@ User::LeaveIfError( iNotifLockProp.Attach( KPSUidBluetoothEnginePrivateCategory, KBTNotifierLocks ) ); } - iLockActive = CBTNotifActive::NewL( this, KBTNotifAuthNotifierLockReq, CActive::EPriorityStandard ); + + if(!iLockActive) + { + iLockActive = CBTNotifActive::NewL( this, KBTNotifAuthNotifierLockReq, CActive::EPriorityStandard ); + } CheckAndSubscribeNotifLocks(); @@ -289,11 +293,15 @@ { FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::Cancel()")); - iLockActive->CancelRequest(); - delete iLockActive; - iLockActive = NULL; + if (iLockActive) + { + iLockActive->CancelRequest(); + delete iLockActive; + iLockActive = NULL; + } + iNotifLockProp.Close(); - + CBTNotifierBase::Cancel(); FLOG(_L("[BTNOTIF]\t CBTAuthNotifier::Cancel() completed")); @@ -538,6 +546,7 @@ } } + // ---------------------------------------------------------- // CBTAuthNotifier::DoRejectAuthorizationL // Handle query threshold and block after user rejects authorization