Fixed issue 47036
authorHimanshu <himanshu.t@samsung.com>
Tue, 23 Jul 2013 10:00:43 +0000 (15:30 +0530)
committerHimanshu <himanshu.t@samsung.com>
Tue, 23 Jul 2013 10:00:43 +0000 (15:30 +0530)
Change-Id: Ie43172c979b877e4d727ab6e82e55ce9adcb818b
Signed-off-by: Himanshu <himanshu.t@samsung.com>
src/GlContentUpdateEventListener.cpp

index 818f175..3291261 100644 (file)
@@ -164,13 +164,17 @@ ContentUpdateEventListener::OnContentFileCreated(Tizen::Content::ContentId conte
        if (contentType == CONTENT_TYPE_IMAGE || contentType == CONTENT_TYPE_VIDEO)
        {
                Tizen::Content::ContentInfo* cntInfo = __pContentManager->GetContentInfoN(contentId);
-               String path = cntInfo->GetContentPath();
-               String dirName = GetDirecotyNameFromFullPath(path);
 
-               FileListPresentationModel* pFileListPM = FileListPresentationModel::GetInstance();
-               pFileListPM->AddDirectoryIfNew(dirName);
-               AlbumListPresentationModel::GetInstance()->OnContentCreated();
-               pFileListPM->OnContentCreated();
+               if ( cntInfo != NULL)
+               {
+                       String path = cntInfo->GetContentPath();
+                       String dirName = GetDirecotyNameFromFullPath(path);
+
+                       FileListPresentationModel* pFileListPM = FileListPresentationModel::GetInstance();
+                       pFileListPM->AddDirectoryIfNew(dirName);
+                       AlbumListPresentationModel::GetInstance()->OnContentCreated();
+                       pFileListPM->OnContentCreated();
+               }
        }
 
        AppLogDebug("EXIT");