Fixed AppControl issue
authorHimanshu <himanshu.t@samsung.com>
Tue, 15 Oct 2013 10:59:42 +0000 (16:29 +0530)
committerHimanshu <himanshu.t@samsung.com>
Tue, 15 Oct 2013 10:59:42 +0000 (16:29 +0530)
Change-Id: I9989cd8fe5770f79f616d8041f7573eedfcb8762
Signed-off-by: Himanshu <himanshu.t@samsung.com>
src/GlImageListEditorPanel.cpp

index b41ee95..4c14084 100644 (file)
@@ -352,8 +352,12 @@ ImageListEditorPanel::OnIconListViewItemStateChanged(IconListView& view, int ind
                {
                        GalleryApp* pApp = static_cast<GalleryApp*>(GalleryApp::GetInstance());
                        const IMap* pArguments = pApp->GetAppControlArguments();
+                       const String* cropMode = null;
+                       if (pArguments != null)
+                       {
+                               cropMode = static_cast<const String*>(pArguments->GetValue(String(APPCONTROL_KEY_IMAGEVIEWER_MODE)));
+                       }
 
-                       const String* cropMode = static_cast<const String*>(pArguments->GetValue(String(APPCONTROL_KEY_IMAGEVIEWER_MODE)));
                        if (cropMode != null)
                        {
                                ArrayList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter);
@@ -362,13 +366,14 @@ ImageListEditorPanel::OnIconListViewItemStateChanged(IconListView& view, int ind
                        }
                        else
                        {
+
                                HashMap* pMap = new (std::nothrow) HashMap(SingleObjectDeleter);
                                result r = pMap->Construct();
                                if (r == E_SUCCESS)
                                {
+
                                        ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
                                        r = pArrayList->Construct();
-
                                        if (r == E_SUCCESS)
                                        {
                                                pArrayList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(index)));