bluetoothengine/btnotif/src/BTNAuthNotifier.cpp
branchRCL_3
changeset 11 f7fbeaeb166a
parent 6 6a29d5ad0713
child 16 95674584745d
--- 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 <btextnotifiers.h>
 #include <AknMediatorFacade.h> // Cover UI
-#include <SecondaryDisplay/BTnotifSecondaryDisplayAPI.h>
+#include <secondarydisplay/BTnotifSecondaryDisplayAPI.h>
 #include <btengconstants.h>
 #include <btengsettings.h>
 #include <e32cmn.h>
@@ -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