Fixed crash of TC.
authorKeuckdo Bang <keuckdo.bang@samsung.net>
Fri, 5 Apr 2013 05:32:47 +0000 (14:32 +0900)
committerKeuckdo Bang <keuckdo.bang@samsung.net>
Fri, 5 Apr 2013 05:32:47 +0000 (14:32 +0900)
Change-Id: I5ee46fc2d30a0a2bb92e2544c3e75057b203b302

src/ui/controls/FUiCtrl_Form.cpp

index 95b59e1..9e1a2fc 100644 (file)
@@ -2036,7 +2036,7 @@ _Form::RemoveHeader(void)
        result r = E_SUCCESS;
        if (__pHeader)
        {
-               if (IsAttachedToMainTree())
+               if (__pHeader->GetParent())
                {
                        r = DetachSystemChild(*__pHeader);
                        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r));
@@ -2059,7 +2059,7 @@ _Form::RemoveFooter(void)
        result r = E_SUCCESS;
        if (__pFooter)
        {
-               if (IsAttachedToMainTree())
+               if (__pFooter->GetParent())
                {
                        r = DetachSystemChild(*__pFooter);
                        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r));
@@ -2082,7 +2082,7 @@ _Form::RemoveTab(void)
        result r = E_SUCCESS;
        if (__pTab)
        {
-               if (IsAttachedToMainTree())
+               if (__pFooter->GetParent())
                {
                        r = DetachSystemChild(*__pTab);
                        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r));