From: Eunki, Hong Date: Mon, 26 Jun 2023 05:14:10 +0000 (+0900) Subject: [NUI] Exception if someone change disposed ImageView's property X-Git-Tag: accepted/tizen/unified/20231205.024657~268 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3ced207619d8e1897b1666d195511c35c59a489a;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] Exception if someone change disposed ImageView's property Since we don't check validation of ImageView itself during change ImageView properties, it will not throw any exceptions. and it will be crashend when we ProcessOnceEvent invoked. Normal View property directly access to DALi side. But ImageView property access to DALi side lazy. Now this throw make app developer easy to find error codes. Signed-off-by: Eunki, Hong --- diff --git a/src/Tizen.NUI/src/public/BaseComponents/ImageView.cs b/src/Tizen.NUI/src/public/BaseComponents/ImageView.cs index ef696fe..fda30cf 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/ImageView.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/ImageView.cs @@ -1462,6 +1462,12 @@ namespace Tizen.NUI.BaseComponents // Update image property map value as inputed value. if (key != 0) { + if(!HasBody()) + { + // Throw exception if ImageView is disposed. + throw new global::System.InvalidOperationException("[NUI][ImageVIew] Someone try to change disposed ImageView's property.\n"); + } + if (cachedImagePropertyMap == null) { cachedImagePropertyMap = new PropertyMap();