}
else
{
+ if (__pFolderPathList == null)
+ {
+ AppLogDebug("EXIT");
+ return INIT_VALUE;
+ }
+
String* pStrPath = static_cast<String*>(__pFolderPathList->GetAt(folderIndex));
ContentDirectory directory;
r = directory.Construct(CONTENT_TYPE_AUDIO);
FolderListPresentationModel::InitializeContentList(int folderIndex)
{
AppLogDebug("ENTER");
- ContentDirectory contentDirectory;
- result r = contentDirectory.Construct(CONTENT_TYPE_AUDIO);
- if (IsFailed(r))
- {
- AppLogDebug("EXIT(%s)", GetErrorMessage(r));
- return;
- }
-
if (__pContentList != null)
{
__pContentList->RemoveAll(true);
__pContentList = null;
}
+ ContentDirectory contentDirectory;
+ result r = contentDirectory.Construct(CONTENT_TYPE_AUDIO);
+ if (IsFailed(r) || __pFolderPathList == null)
+ {
+ AppLogDebug("EXIT(%s)", GetErrorMessage(r));
+ return;
+ }
+
String* pFolderPath = static_cast<String*>(__pFolderPathList->GetAt(folderIndex));
if (pFolderPath != null)
{
FolderListPresentationModel::UpdateFolderPathList(void)
{
AppLogDebug("ENTER");
- result r = E_SUCCESS;
-
if (__pFolderPathList != null)
{
__pFolderPathList->RemoveAll(true);
}
__pFolderPathList = ContentDirectoryPathList();
- TryCatch(__pFolderPathList != null, r = E_FAILURE, "__pFolderPathList is null");
+ result r = GetLastResult();
+ if (__pFolderPathList == null)
+ {
+ r = E_FAILURE;
+ }
AppLogDebug("EXIT");
return r;
-
-CATCH:
- return r;
}
\ No newline at end of file