Fix svace issue
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / control-impl.cpp
index e7a90a1..fbf364a 100644 (file)
@@ -448,7 +448,7 @@ void Control::Initialize()
   Self().GetTypeInfo(type);
   if(type)
   {
-    auto typeName = type.GetName();
+    const auto& typeName = type.GetName();
     DevelControl::AppendAccessibilityAttribute(Toolkit::Control::DownCast(Self()), "class", typeName);
   }
 }
@@ -597,7 +597,11 @@ void Control::OnPropertySet(Property::Index index, const Property::Value& proper
     }
     case Actor::Property::VISIBLE:
     {
-      GetAccessibleObject()->EmitVisible(Self().GetProperty<bool>(Actor::Property::VISIBLE));
+      auto* accessible = GetAccessibleObject();
+      if(DALI_LIKELY(accessible))
+      {
+        accessible->EmitVisible(Self().GetProperty<bool>(Actor::Property::VISIBLE));
+      }
       break;
     }
     case DevelActor::Property::USER_INTERACTION_ENABLED: