Fix Jira issue about N_SE-37462
authorWoowon <woowon.park@samsung.com>
Mon, 6 May 2013 05:13:27 +0000 (14:13 +0900)
committerWoowon <woowon.park@samsung.com>
Mon, 6 May 2013 05:13:27 +0000 (14:13 +0900)
Change-Id: Ia7e4e7bc1f644688cadbeed97061830d0b3e8cb4
Signed-off-by: Woowon <woowon.park@samsung.com>
src/FNetNfc_NfcManagerImpl.cpp

index e8533d1..c14d4b0 100644 (file)
@@ -87,43 +87,49 @@ _NfcManagerImpl::~_NfcManagerImpl(void)
        delete __pCurrentTagImpl;
        delete __pMgrEvent;
 
-       unique_ptr<IList> pTagConditionList(__pTagConditionMap->GetValuesN());
-       unique_ptr<IEnumerator> pTagConditionEnum(pTagConditionList->GetEnumeratorN());
-       while (pTagConditionEnum->MoveNext() == E_SUCCESS)
+       if (__pTagConditionMap)
        {
-               _NfcTagEventMap* pEventMap = dynamic_cast <_NfcTagEventMap*> (pTagConditionEnum->GetCurrent());
-               if (pEventMap)
+               unique_ptr<IList> pTagConditionList(__pTagConditionMap->GetValuesN());
+               unique_ptr<IEnumerator> pTagConditionEnum(pTagConditionList->GetEnumeratorN());
+               while (pTagConditionEnum->MoveNext() == E_SUCCESS)
                {
-                       unique_ptr<IListT<_NfcTagDiscoveryEvent*> > pEventList(pEventMap->GetValuesN());
-                       unique_ptr<IEnumeratorT<_NfcTagDiscoveryEvent*> > pEventEnum(pEventList->GetEnumeratorN());
-                       while (pEventEnum->MoveNext() == E_SUCCESS)
+                       _NfcTagEventMap* pEventMap = dynamic_cast <_NfcTagEventMap*> (pTagConditionEnum->GetCurrent());
+                       if (pEventMap)
                        {
-                               _NfcTagDiscoveryEvent* pEvent = null;
-                               pEventEnum->GetCurrent(pEvent);
-                               delete pEvent;
+                               unique_ptr<IListT<_NfcTagDiscoveryEvent*> > pEventList(pEventMap->GetValuesN());
+                               unique_ptr<IEnumeratorT<_NfcTagDiscoveryEvent*> > pEventEnum(pEventList->GetEnumeratorN());
+                               while (pEventEnum->MoveNext() == E_SUCCESS)
+                               {
+                                       _NfcTagDiscoveryEvent* pEvent = null;
+                                       pEventEnum->GetCurrent(pEvent);
+                                       delete pEvent;
+                               }
                        }
                }
+               delete __pTagConditionMap;
        }
-       delete __pTagConditionMap;
 
-       unique_ptr<IList> pNdefConditionList(__pNdefConditionMap->GetValuesN());
-       unique_ptr<IEnumerator> pNdefConditionEnum(pNdefConditionList->GetEnumeratorN());
-       while (pNdefConditionEnum->MoveNext() == E_SUCCESS)
+       if (__pNdefConditionMap)
        {
-               _NdefMsgEventMap* pEventMap = dynamic_cast <_NdefMsgEventMap*> (pNdefConditionEnum->GetCurrent());
-               if (pEventMap)
+               unique_ptr<IList> pNdefConditionList(__pNdefConditionMap->GetValuesN());
+               unique_ptr<IEnumerator> pNdefConditionEnum(pNdefConditionList->GetEnumeratorN());
+               while (pNdefConditionEnum->MoveNext() == E_SUCCESS)
                {
-                       unique_ptr<IListT<_NdefMessageDiscoveryEvent*> > pEventList(pEventMap->GetValuesN());
-                       unique_ptr<IEnumeratorT<_NdefMessageDiscoveryEvent*> > pEventEnum(pEventList->GetEnumeratorN());
-                       while (pEventEnum->MoveNext() == E_SUCCESS)
+                       _NdefMsgEventMap* pEventMap = dynamic_cast <_NdefMsgEventMap*> (pNdefConditionEnum->GetCurrent());
+                       if (pEventMap)
                        {
-                               _NdefMessageDiscoveryEvent* pEvent = null;
-                               pEventEnum->GetCurrent(pEvent);
-                               delete pEvent;
+                               unique_ptr<IListT<_NdefMessageDiscoveryEvent*> > pEventList(pEventMap->GetValuesN());
+                               unique_ptr<IEnumeratorT<_NdefMessageDiscoveryEvent*> > pEventEnum(pEventList->GetEnumeratorN());
+                               while (pEventEnum->MoveNext() == E_SUCCESS)
+                               {
+                                       _NdefMessageDiscoveryEvent* pEvent = null;
+                                       pEventEnum->GetCurrent(pEvent);
+                                       delete pEvent;
+                               }
                        }
                }
+               delete __pNdefConditionMap;
        }
-       delete __pNdefConditionMap;
 
        delete __pDeviceDiscoveryEvent;
 }