{
int count = __actionId.GetCount();
int actionId = -1;
+ result r = E_SUCCESS;
if (count <= 0 || index >= count)
{
return -1;
}
- __actionId.GetAt(index, actionId);
+ r = __actionId.GetAt(index, actionId);
+ SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, actionId, r, "[%s] Propagating.", GetErrorMessage(r));
return actionId;
}
for(int index = 0; index < count; index++)
{
pItem = static_cast <_ContextMenuItem*>(__items.GetAt(index));
- pItem->SetAndInvalidate(false);
+ if (pItem)
+ {
+ pItem->SetAndInvalidate(false);
+ }
}
}
_FastScrollIndex* pFormerIndex = null;
pChildIndexList = new (std::nothrow) ArrayList();
- SysTryCatch(NID_UI_CTRL, pChildIndexList, , E_OUT_OF_MEMORY, "Memory allocation failed.");
+ SysTryCatchLabel(NID_UI_CTRL, pChildIndexList, , CATCH1, E_OUT_OF_MEMORY, "Memory allocation failed.");
k = 0;
pFormerIndex = GetChildIndex(GetChildCount(pFormerList) - 1, pFormerList);
- SysTryCatch(NID_UI_CTRL, pFormerIndex, , GetLastResult(),
- "[%s] Failed to get the child index.", GetErrorMessage(GetLastResult()));
+ SysTryCatchLabel(NID_UI_CTRL, pFormerIndex, , CATCH1, GetLastResult(), "[%s] Failed to get the child index.", GetErrorMessage(GetLastResult()));
pFormerIndex->SetNextIndexList(pChildIndexList);
continue;
}
delete[] pTempChar;
return E_SUCCESS;
+CATCH1:
+ delete pChildIndexList;
+ pChildIndexList = null;
+
CATCH:
delete indexText;
indexText = null;
- delete pChildIndexList;
- pChildIndexList = null;
- delete pFirstIndexList;
- pFirstIndexList = null;
delete[] pTempChar;
return r;
if (onAccessibility)
{
r = pIndexView->AddAccessibilityElement(control);
- SysTryReturnResult(NID_UI_CTRL, r = E_SUCCESS, r, "Failed to Add accessibility element.");
+ SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to Add accessibility element.");
}
else
{
Color focusUiColor = __pProperty->GetBorderColor(isFocused);
pShadowBitmap = Tizen::Graphics::_BitmapImpl::GetColorReplacedBitmapN(*pShadowBitmap, Color::GetColor(COLOR_ID_MAGENTA), focusUiColor);
+ SysTryReturn(NID_UI_CTRL, pShadowBitmap != null, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pShadowBitmap))
{
pCanvas->DrawBitmap(__pProperty->GetDropShadowBitmapBounds(), *pShadowBitmap);
}
__pFocusVE->SetShowState(true);
- delete pCanvas;
+ delete pShadowBitmap;
}
+ delete pCanvas;
}
else
{
if (findPrevTokenLoopFlag)
{
pPreviousToken = static_cast< _Token* >(__pTokenList->GetAt(index - 1));
+ r = GetLastResult();
+ SysTryReturnResult(NID_UI_CTRL, pPreviousToken != null, r, "Propagating.");
+
findPrevTokenLoopFlag = false;
}
{
_Token* pToken = null;
pToken = static_cast< _Token* >(__pTokenList->GetAt(focusedTokenIndex));
+ r = GetLastResult();
+ SysTryReturnResult(NID_UI_CTRL, pToken != null, r, "Propagating.");
focusedTokenRectangle = pToken->displayRect;
{
_Token* pToken = null;
pToken = static_cast <_Token*>(__pTokenList->GetAt(__focusedTokenIndex));
+ r = GetLastResult();
+ SysTryReturnResult(NID_UI_CTRL, pToken != null, r, "Propagating.");
focussedTokenRectangle = pToken->displayRect;