modify CUsbConnectionListener failure error handling 99/37899/1
authorJehun Lim <jehun.lim@samsung.com>
Wed, 8 Apr 2015 07:31:15 +0000 (16:31 +0900)
committerJehun Lim <jehun.lim@samsung.com>
Wed, 8 Apr 2015 07:31:15 +0000 (16:31 +0900)
Change-Id: If8e6346369733a7e763f6e3b9aba9bd4b0559e2e
Signed-off-by: Jehun Lim <jehun.lim@samsung.com>
src/view/gallery-view/gallery_view.cpp

index 4690c6f..245f92e 100644 (file)
@@ -593,8 +593,9 @@ bool CGalleryView::Create(void *data)
 
        if (!CMediaContentDbUpdateListener::Create())
                goto error;
+
        if (!CUsbConnectionListener::Create())
-               goto error;
+               _DBG("UsbConnectionListener creation failed");
 
        if (!m_DrawItems())
                goto error;
@@ -617,7 +618,8 @@ void CGalleryView::Destroy(void)
        ASSERT(m);
 
        CMediaContentDbUpdateListener::Destroy();
-       CUsbConnectionListener::Destroy();
+       if (CUsbConnectionListener::FlagCreate())
+               CUsbConnectionListener::Destroy();
 
        m->pMediadata->DestroyMediaList();