From: Jaehyun Cho Date: Thu, 9 Sep 2021 02:57:42 +0000 (+0900) Subject: [NUI] Fix svace issue of dereferencing possible null handle in TextUtils X-Git-Tag: accepted/tizen/unified/20231205.024657~1486 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=88ad968dee41199bbdc22ccdc5d20f0ca7300ac2;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] Fix svace issue of dereferencing possible null handle in TextUtils Since PropertyMap.Find can return null, Find().Get() should be replaced with Find()?.Get(). --- diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextUtils.cs b/src/Tizen.NUI/src/public/BaseComponents/TextUtils.cs index 618de4f..08ee53c 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TextUtils.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextUtils.cs @@ -1651,9 +1651,9 @@ namespace Tizen.NUI.BaseComponents map.Find(0)?.Get(out text); map.Find(1)?.Get(out textFocused); - map.Find(2).Get(color); + map.Find(2)?.Get(color); map.Find(3)?.Get(out fontFamily); - map.Find(4).Get(fontStyle); + map.Find(4)?.Get(fontStyle); pointSizeValue = map.Find(5); pixelSizeValue = map.Find(6); map.Find(7)?.Get(out ellipsis);