From e5d676ff829aefe6fd7a1437ae9d62a95d553102 Mon Sep 17 00:00:00 2001 From: Umar Date: Mon, 5 Jun 2017 17:23:48 +0100 Subject: [PATCH] Ensure PropertyValue returned from native side is not null. The BACKGROUND property returns a PropertyMap and we are trying to find Visual.Property.Type inside that PropertyMap which is not available as it has not been set in the application side, and hence causing a crash. Anyway, this has now been fixed by adding null checks. Change-Id: I2e2fe44a94e4fde15c259a9e67655dfabf165e95 --- Tizen.NUI/src/public/BaseComponents/View.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Tizen.NUI/src/public/BaseComponents/View.cs b/Tizen.NUI/src/public/BaseComponents/View.cs index 177a6d1..54183e7 100755 --- a/Tizen.NUI/src/public/BaseComponents/View.cs +++ b/Tizen.NUI/src/public/BaseComponents/View.cs @@ -989,10 +989,10 @@ namespace Tizen.NUI.BaseComponents Tizen.NUI.PropertyMap background = Background; int visualType = 0; - background.Find(Visual.Property.Type).Get(out visualType); + background.Find(Visual.Property.Type)?.Get(out visualType); if (visualType == (int)Visual.Type.Color) { - background.Find(ColorVisualProperty.MixColor).Get(backgroundColor); + background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor); } return backgroundColor; @@ -1014,10 +1014,10 @@ namespace Tizen.NUI.BaseComponents Tizen.NUI.PropertyMap background = Background; int visualType = 0; - background.Find(Visual.Property.Type).Get(out visualType); + background.Find(Visual.Property.Type)?.Get(out visualType); if (visualType == (int)Visual.Type.Image) { - background.Find(ImageVisualProperty.URL).Get(out backgroundImage); + background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage); } return backgroundImage; -- 2.7.4