[Tizen] Add null check on GetStates
authorHosang Kim <hosang12.kim@samsung.com>
Wed, 23 Aug 2023 03:16:12 +0000 (12:16 +0900)
committerHosang Kim <hosang12.kim@samsung.com>
Wed, 23 Aug 2023 03:16:12 +0000 (12:16 +0900)
Sometimes accessible parent is null, so add checking null.

dali/devel-api/adaptor-framework/accessibility.cpp

index 915da51..855a36e 100644 (file)
@@ -445,12 +445,17 @@ public:
       state[State::VISIBLE]   = true;
       state[State::ACTIVE]    = visible;
     }
-    else
+    else if (GetParent())
     {
       auto parentState      = GetParent()->GetStates();
       state[State::SHOWING] = parentState[State::SHOWING];
       state[State::VISIBLE] = parentState[State::VISIBLE];
     }
+    else
+    {
+      state[State::SHOWING] = false; 
+      state[State::VISIBLE] = false; 
+    }
     return state;
   }