_CHECK(mhandle->pPlayback->Create() == true)
_CHECK(mhandle->pPlayback->SetCallback(sm_CbPlaybackCompletion, this) == true)
_CHECK(mhandle->pPlaylist = new CPlaylist)
- _CHECK(CUsbConnectionListener::Create() == true)
_WHEN_SUCCESS{
mhandle->statePlay = PLAY_STATUS_INITIAL;
CInfo::SetSortType(E_SORT_TITLE_A_Z);
CInfo::SetSourceType(SOURCE_TYPE_ALL);
mhandle->cbinfo = mhandle->pMediadata->AddCallback(E_CONTENT_UPDATE, sm_CbContentUpdated, this);
+
+ // Even if CUsbConnectionListener creation failed,
+ // application should run properly.
+ if (!CUsbConnectionListener::Create())
+ _DBG("CUsbConnectionListener::Create failed");
}
- _CHECK_FAIL{ CUsbConnectionListener::Destroy(); }
_CHECK_FAIL{ delete mhandle->pPlaylist; }
_CHECK_FAIL{}
_CHECK_FAIL{ mhandle->pPlayback->Destroy(); }
void CMusicController::t_Destroy(void)
{
- CUsbConnectionListener::Destroy();
+ if (CUsbConnectionListener::FlagCreate())
+ CUsbConnectionListener::Destroy();
if (!m->pPlayback->UnsetCallback())
_ERR(" playback remove completion callback failed");