Fixed prevent issues
authorHimanshu <himanshu.t@samsung.com>
Tue, 25 Jun 2013 12:13:02 +0000 (17:43 +0530)
committerHimanshu <himanshu.t@samsung.com>
Tue, 25 Jun 2013 12:13:02 +0000 (17:43 +0530)
Change-Id: I6f2dc3e2f19f7fe7ad1654d48ca84207aff595ae
Signed-off-by: Himanshu <himanshu.t@samsung.com>
src/GlAlbumListPresentationModel.cpp
src/GlAlbumNameEditorForm.cpp
src/GlFileListPresentationModel.cpp

index ae0007b..ebcca82 100644 (file)
@@ -780,26 +780,11 @@ AlbumListPresentationModel::InitializeAlbumInfoList(const ContentType& contentTy
        return;
 
 CATCH:
-       if (pContentDirectoryPathList != null)
-       {
-               delete pContentDirectoryPathList;
-       }
-       if (pAllAlbumInfo != null)
-       {
-               delete pAllAlbumInfo;
-       }
-       if (pCameraAlbumInfo != null)
-       {
-               delete pCameraAlbumInfo;
-       }
-       if (pDownloadAlbumInfo != null)
-       {
-               delete pDownloadAlbumInfo;
-       }
-       if (pNoNameAlbumInfo != null)
-       {
-               delete pNoNameAlbumInfo;
-       }
+       delete pContentDirectoryPathList;
+       delete pAllAlbumInfo;
+       delete pCameraAlbumInfo;
+       delete pDownloadAlbumInfo;
+       delete pNoNameAlbumInfo;
 }
 
 String
index 15d6c36..4c76280 100644 (file)
@@ -538,6 +538,7 @@ AlbumNameEditorForm::OnSceneActivatedN(const SceneId& previousSceneId,
                        }
                        delete pEnum;
                        delete pArgs;
+                       pArgs = NULL ;
                }
        }
 
index d71a4eb..5fde925 100644 (file)
@@ -1588,27 +1588,28 @@ FileListPresentationModel::RotateImage(int index, RotateMode rotateMode)
        if (r == E_SUCCESS)
        {
                imageFormat = img.GetImageFormat(filePath);
-       }
 
-       r = rotateBuffer.Construct(filePath);
-       if (r == E_SUCCESS)
-       {
-               if (rotateMode == ROTATE_MODE_RIGHT)
+               r = rotateBuffer.Construct(filePath);
+               if (r == E_SUCCESS)
                {
-                       pRotatedBuffer = rotateBuffer.RotateN(IMAGE_ROTATION_90);
+                       if (rotateMode == ROTATE_MODE_RIGHT)
+                       {
+                               pRotatedBuffer = rotateBuffer.RotateN(IMAGE_ROTATION_90);
+                       }
+                       else
+                       {
+                               pRotatedBuffer = rotateBuffer.RotateN(IMAGE_ROTATION_270);
+                       }
                }
-               else
+
+               if (pRotatedBuffer != null)
                {
-                       pRotatedBuffer = rotateBuffer.RotateN(IMAGE_ROTATION_270);
+                       r = pRotatedBuffer->EncodeToFile(filePath, imageFormat, true, 100);
+                       delete pRotatedBuffer;
+                       ContentManager::ScanFile(filePath);
                }
        }
 
-       if (pRotatedBuffer != null)
-       {
-               r = pRotatedBuffer->EncodeToFile(filePath, imageFormat, true, 100);
-               delete pRotatedBuffer;
-               ContentManager::ScanFile(filePath);
-       }
        return r;
 }