Return E_INVALID_ARG if input param is null
authorkeonpyo.kong <keonpyo.kong@samsung.com>
Tue, 2 Apr 2013 09:50:33 +0000 (18:50 +0900)
committerkeonpyo.kong <keonpyo.kong@samsung.com>
Tue, 2 Apr 2013 09:50:40 +0000 (18:50 +0900)
Change-Id: I221133549247b45774b6e31ef9f8fda13c57cf31
Signed-off-by: keonpyo.kong <keonpyo.kong@samsung.com>
src/ui/FUiContainer.cpp
src/ui/FUiControl.cpp
src/ui/FUiTouchGestureDetector.cpp

index 05d6332..f053684 100755 (executable)
@@ -142,6 +142,7 @@ Container::AddControl(const Control& control)
 result
 Container::AddControl(Control* pControl)
 {
+       SysTryReturnResult(NID_UI, pControl != null, E_INVALID_ARG, "pControl is null.");
        _ContainerImpl* pImpl = _ContainerImpl::GetInstance(*this);
        SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
 
@@ -169,6 +170,7 @@ Container::RemoveControl(const Control& control)
 result
 Container::RemoveControl(Control* pControl)
 {
+       SysTryReturnResult(NID_UI, pControl != null, E_INVALID_ARG, "pControl is null.");
        _ContainerImpl* pImpl = _ContainerImpl::GetInstance(*this);
        SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
 
@@ -199,6 +201,7 @@ Container::SetControlAt(const Control& control, int index)
 result
 Container::SetControlAt(Control* pControl, int index)
 {
+       SysTryReturnResult(NID_UI, pControl != null, E_INVALID_ARG, "pControl is null.");
        _ContainerImpl* pImpl = _ContainerImpl::GetInstance(*this);
        SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
 
@@ -217,6 +220,7 @@ Container::GetControlAt(const Control& control, int& index) const
 result
 Container::GetControlAt(const Control* pControl, int& index) const
 {
+       SysTryReturnResult(NID_UI, pControl != null, E_INVALID_ARG, "pControl is null.");
        const _ContainerImpl* pImpl = _ContainerImpl::GetInstance(*this);
        SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
 
@@ -289,6 +293,7 @@ Container::IsAncestorOf(const Control& control) const
 bool
 Container::IsAncestorOf(const Control* pControl) const
 {
+       SysTryReturnResult(NID_UI, pControl != null, E_INVALID_ARG, "pControl is null.");
        const _ContainerImpl* pImpl = _ContainerImpl::GetInstance(*this);
        SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
 
@@ -447,6 +452,7 @@ Container::IsControlAlwaysAtBottom(const Control& control) const
 bool
 Container::IsControlAlwaysAtBottom(const Control* pControl) const
 {
+       SysTryReturnResult(NID_UI, pControl != null, E_INVALID_ARG, "pControl is null.");
        const _ContainerImpl* pImpl = _ContainerImpl::GetInstance(*this);
        SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
 
@@ -461,6 +467,7 @@ Container::IsControlAlwaysOnTop(const Control& control) const
 bool
 Container::IsControlAlwaysOnTop(const Control* pControl) const
 {
+       SysTryReturnResult(NID_UI, pControl != null, E_INVALID_ARG, "pControl is null.");
        const _ContainerImpl* pImpl = _ContainerImpl::GetInstance(*this);
        SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
 
index 8ec997f..ff24840 100644 (file)
@@ -1515,6 +1515,7 @@ Control::AddGestureDetector(const TouchGestureDetector& gestureDetector)
 result
 Control::AddGestureDetector(TouchGestureDetector* pGestureDetector)
 {
+       SysTryReturnResult(NID_UI, pGestureDetector != null, E_INVALID_ARG, "pGestureDetector is null.");
        _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this);
        SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use.");
 
@@ -1533,6 +1534,7 @@ Control::RemoveGestureDetector(const TouchGestureDetector& gestureDetector)
 result
 Control::RemoveGestureDetector(TouchGestureDetector* pGestureDetector)
 {
+       SysTryReturnResult(NID_UI, pGestureDetector != null, E_INVALID_ARG, "pGestureDetector is null.");
        _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this);
        SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use.");
 
index 177fbb0..ca85bae 100644 (file)
@@ -150,6 +150,7 @@ TouchGestureDetector::StartOnFailureOf(const TouchGestureDetector& gesture)
 result
 TouchGestureDetector::StartOnFailureOf(TouchGestureDetector* pGestureDetector)
 {
+       SysTryReturnResult(NID_UI, pGestureDetector != null, E_INVALID_ARG, "pGestureDetector is null.");
        SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used.");
 
        result r = __pTouchGestureDetectorImpl->StartOnFailureOf(*pGestureDetector);