Crash was fixed.
authorKeuckdo Bang <keuckdo.bang@samsung.net>
Wed, 3 Apr 2013 14:03:26 +0000 (23:03 +0900)
committerKeuckdo Bang <keuckdo.bang@samsung.net>
Wed, 3 Apr 2013 14:03:26 +0000 (23:03 +0900)
Change-Id: I6800715c60da02c827c0b5881e54e0c5865c943e

src/ui/controls/FUiCtrl_Form.cpp

index 33fa411..49617cc 100644 (file)
@@ -1995,8 +1995,14 @@ _Form::GetTabHeightF(void) const
 bool
 _Form::RemoveHeader(void)
 {
+       result r = E_SUCCESS;
        if (__pHeader)
        {
+               if (IsAttachedToMainTree())
+               {
+                       r = DetachSystemChild(*__pHeader);
+                       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r));
+               }
                __pHeader = null;
 
                AdjustClientBounds();
@@ -2012,8 +2018,14 @@ _Form::RemoveHeader(void)
 bool
 _Form::RemoveFooter(void)
 {
+       result r = E_SUCCESS;
        if (__pFooter)
        {
+               if (IsAttachedToMainTree())
+               {
+                       r = DetachSystemChild(*__pFooter);
+                       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r));
+               }
                __pFooter = null;
 
                AdjustClientBounds();
@@ -2029,8 +2041,14 @@ _Form::RemoveFooter(void)
 bool
 _Form::RemoveTab(void)
 {
+       result r = E_SUCCESS;
        if (__pTab)
        {
+               if (IsAttachedToMainTree())
+               {
+                       r = DetachSystemChild(*__pTab);
+                       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r));
+               }
                __pTab = null;
 
                AdjustClientBounds();