Fix svace issue 92/213392/1
authorhuiyu.eun <huiyu.eun@samsung.com>
Thu, 5 Sep 2019 01:49:13 +0000 (10:49 +0900)
committerhuiyu.eun <huiyu.eun@samsung.com>
Thu, 5 Sep 2019 01:51:35 +0000 (10:51 +0900)
Return value of a function 'Dali::Property::Map::Find' is dereferenced without checking.

Change-Id: I944682e9f4589235052c2b33dae22e59b68b6431
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
dali-csharp-binder/src/dali_wrap.cpp

index 1349d7b..5289e2f 100755 (executable)
@@ -63107,7 +63107,11 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_ViewImpl_GetBackgroundColor(void * jar
       {
         if(resultMap->Find( Toolkit::Visual::Property::TYPE )->Get<int>() == Visual::COLOR )
         {
-          result = resultMap->Find( ColorVisual::Property::MIX_COLOR )->Get<Vector4>();
+          Dali::Property::Value* value = resultMap->Find( ColorVisual::Property::MIX_COLOR );
+          if (value)
+          {
+            result = value->Get<Vector4>();
+          }
         }
       }
     } catch (std::out_of_range& e) {