Fix for N_SE-52158
authorSaravana Balaji S <saravana.bs@samsung.com>
Fri, 13 Sep 2013 08:34:10 +0000 (17:34 +0900)
committerSaravana Balaji S <saravana.bs@samsung.com>
Fri, 13 Sep 2013 08:34:10 +0000 (17:34 +0900)
Change-Id: I5d01c03c11fa220c6b612d5b733c4d9842c9e3d4
Signed-off-by: Saravana Balaji S <saravana.bs@samsung.com>
src/ui/controls/FUiCtrl_GroupedListViewImpl.cpp
src/ui/controls/FUiCtrl_ListViewImpl.cpp
src/ui/controls/FUiCtrl_TableViewPresenter.cpp

index c32d646..4193d4a 100644 (file)
@@ -1166,7 +1166,7 @@ _GroupedListViewImpl::RefreshList(int groupIndex, int itemIndex, ListRefreshType
                                needChangeEventTarget = true;
                        }
 
-                       if (pListViewItem != null && pListViewItem->IsFocusModeStateEnabled()
+                       if (pListViewItem != null && pListViewItem->GetRootWindow() && pListViewItem->IsFocusModeStateEnabled()
                                        && pListViewItem->IsFocused() && pListViewItem->GetRootWindow()->IsActivated())
                        {
                                itemFocused = true;
@@ -1939,7 +1939,7 @@ _GroupedListViewImpl::OnChangeLayout(_ControlOrientation orientation)
 {
        __isOrientationChanged = true;
 
-       if (GetCore().IsFocusModeStateEnabled() && GetCore().GetRootWindow()->IsActivated())
+       if (GetCore().IsFocusModeStateEnabled() && GetCore().GetRootWindow() && GetCore().GetRootWindow()->IsActivated())
        {
                GetCore().SetFocusDuringOrientationChange();
        }
@@ -1966,7 +1966,7 @@ _GroupedListViewImpl::OnBoundsChanged(void)
                __isOrientationChanged = false;
 
                if (GetCore().IsTableViewFocused() && GetCore().IsFocusModeStateEnabled()
-                               && GetCore().GetRootWindow()->IsActivated())
+                               && GetCore().GetRootWindow() && GetCore().GetRootWindow()->IsActivated())
                {
                        GetCore().RestoreFocus(true);
                        UpdateList(true);
index 64a4a51..4f0251b 100644 (file)
@@ -1134,7 +1134,7 @@ _ListViewImpl::RefreshList(int index, ListRefreshType type)
                        }
 
                        if (pListViewItem != null && pListViewItem->IsFocusModeStateEnabled()
-                                       && pListViewItem->IsFocused() && pListViewItem->GetRootWindow()->IsActivated())
+                                       && pListViewItem->IsFocused() && pListViewItem->GetRootWindow() && pListViewItem->GetRootWindow()->IsActivated())
                        {
                                itemFocused = true;
                        }
@@ -1794,7 +1794,7 @@ _ListViewImpl::OnChangeLayout(_ControlOrientation orientation)
 {
        __isOrientationChanged = true;
 
-       if (GetCore().IsFocusModeStateEnabled() && GetCore().GetRootWindow()->IsActivated())
+       if (GetCore().IsFocusModeStateEnabled() && GetCore().GetRootWindow() && GetCore().GetRootWindow()->IsActivated())
        {
                GetCore().SetFocusDuringOrientationChange();
        }
@@ -1821,7 +1821,7 @@ _ListViewImpl::OnBoundsChanged(void)
                __isOrientationChanged = false;
 
                if (GetCore().IsTableViewFocused() && GetCore().IsFocusModeStateEnabled()
-                               && GetCore().GetRootWindow()->IsActivated())
+                               && GetCore().GetRootWindow() && GetCore().GetRootWindow()->IsActivated())
                {
                        GetCore().RestoreFocus(true);
                        UpdateList(true);
index 9186e2c..0dfa165 100644 (file)
@@ -5869,11 +5869,19 @@ _TableViewPresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyIn
 void
 _TableViewPresenter::OnDrawFocus(void)
 {
-       if (!__pTableView->IsFocusModeStateEnabled() || !__pTableView->GetRootWindow()->IsActivated())
+       if (!__pTableView->IsFocusModeStateEnabled())
        {
                return;
        }
 
+       if (__pTableView->GetRootWindow())
+       {
+               if(!__pTableView->GetRootWindow()->IsActivated())
+               {
+                       return;
+               }
+       }
+
        _Control* pFocusedControl = null;
        _Window* pTop = __pTableView->GetRootWindow();
        if (pTop)