bluetoothengine/btnotif/src/BTNInqNotifier.cpp
branchRCL_3
changeset 8 0707dd69d236
parent 0 f63038272f30
--- a/bluetoothengine/btnotif/src/BTNInqNotifier.cpp	Fri Feb 19 22:59:18 2010 +0200
+++ b/bluetoothengine/btnotif/src/BTNInqNotifier.cpp	Fri Mar 12 15:43:23 2010 +0200
@@ -59,6 +59,7 @@
     {
     FLOG(_L("[BTNOTIF]\t CBTInqNotifier::~CBTInqNotifier()"));
     delete iUi;
+    iUi = NULL;
     FLOG(_L("[BTNOTIF]\t CBTInqNotifier::~CBTInqNotifier() completed"));
     }
 
@@ -84,7 +85,7 @@
     {
     FLOG(_L("[BTNOTIF]\t CBTInqNotifier::GetParamsL()"));
 
-    if( iUi || iReplySlot!=NULL || !iMessage.IsNull() )
+    if( !iMessage.IsNull() )
         {
         aMessage.Complete(KErrInUse);
         return;
@@ -124,6 +125,8 @@
     if( iUi )
         {
         iUi->Cancel();
+        delete iUi;
+        iUi = NULL;
         }
     CBTNotifierBase::Cancel();
     FLOG(_L("[BTNOTIF]\t CBTInqNotifier::Cancel() completed"));