From dbde414844ec354fe3333fb6b6eac1550ec77f71 Mon Sep 17 00:00:00 2001 From: Bhavya Kumili Date: Wed, 29 May 2013 12:08:43 +0530 Subject: [PATCH] Fixes related to prevent issues Change-Id: I8843ef240d820fd36917a1371970cf945b51ff0d --- src/ui/controls/FUiCtrl_DateTimeBar.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/ui/controls/FUiCtrl_DateTimeBar.cpp b/src/ui/controls/FUiCtrl_DateTimeBar.cpp index be9b686..d73b948 100644 --- a/src/ui/controls/FUiCtrl_DateTimeBar.cpp +++ b/src/ui/controls/FUiCtrl_DateTimeBar.cpp @@ -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); -- 2.7.4