Fixes related to prevent issues
authorBhavya Kumili <bhavya.k@samsung.com>
Wed, 29 May 2013 06:38:43 +0000 (12:08 +0530)
committerBhavya Kumili <bhavya.k@samsung.com>
Wed, 29 May 2013 06:38:43 +0000 (12:08 +0530)
Change-Id: I8843ef240d820fd36917a1371970cf945b51ff0d

src/ui/controls/FUiCtrl_DateTimeBar.cpp

index be9b686..d73b948 100644 (file)
@@ -834,11 +834,14 @@ _DateTimeBar::CreateAnimationN(VisualElement& source, bool open)
 
        VisualElementPropertyAnimation* pOpacityAnimation = null;
        VisualElementPropertyAnimation* pBoundsAnimation = null;
-       String* pOpenUserData = new String(L"BarOpenAnimation");
-       SysTryReturn(NID_UI_CTRL, pOpenUserData, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed");
+       String* pOpenUserData = null;
+       String* pCloseUserData = null;
 
-       String* pCloseUserData = new String(L"BarCloseAnimation");
-       SysTryReturn(NID_UI_CTRL, pCloseUserData, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed");
+       pOpenUserData = new (std::nothrow) String(L"BarOpenAnimation");
+       SysTryCatch(NID_UI_CTRL, pOpenUserData, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed");
+
+       pCloseUserData = new (std::nothrow) String(L"BarCloseAnimation");
+       SysTryCatch(NID_UI_CTRL, pCloseUserData, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed");
 
        pAnimationGroup->SetDuration(ANIMATION_DURATION);