Fix for TDIS-5633.[Removal of Parent Controls attached to Splitpanel Panes in Destruc...
authorsr.shashank <sr.shashank@samsung.com>
Wed, 8 May 2013 10:10:11 +0000 (15:40 +0530)
committersr.shashank <sr.shashank@samsung.com>
Wed, 8 May 2013 10:19:34 +0000 (15:49 +0530)
Change-Id: Ia2e29cd796711363b6fc3f0611f30b2e639acbd8
Signed-off-by: sr.shashank <sr.shashank@samsung.com>
src/ui/controls/FUiCtrl_SplitPanel.cpp

index 48b5675..0b381bc 100644 (file)
@@ -189,11 +189,6 @@ CATCH:
 
        if (__pFirstPaneParent)
        {
-               if (__pFirstPane)
-               {
-                       __pFirstPaneParent->DetachChild(*__pFirstPane);
-               }
-
                DetachChild(*__pFirstPaneParent);
 
                delete __pFirstPaneParent;
@@ -202,11 +197,6 @@ CATCH:
 
        if (__pSecondPaneParent)
        {
-               if (__pSecondPane)
-               {
-                       __pSecondPaneParent->DetachChild(*__pSecondPane);
-               }
-
                DetachChild(*__pSecondPaneParent);
 
                delete __pSecondPaneParent;
@@ -253,6 +243,22 @@ _SplitPanel::~_SplitPanel(void)
                __pDividerVisualElement = null;
        }
 
+       if (__pFirstPaneParent)
+       {
+               DetachChild(*__pFirstPaneParent);
+
+               delete __pFirstPaneParent;
+               __pFirstPaneParent = null;
+       }
+
+       if (__pSecondPaneParent)
+       {
+               DetachChild(*__pSecondPaneParent);
+
+               delete __pSecondPaneParent;
+               __pSecondPaneParent = null;
+       }
+
        ClearLastResult();
 }