From 3ced207619d8e1897b1666d195511c35c59a489a Mon Sep 17 00:00:00 2001 From: "Eunki, Hong" Date: Mon, 26 Jun 2023 14:14:10 +0900 Subject: [PATCH] [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 --- src/Tizen.NUI/src/public/BaseComponents/ImageView.cs | 6 ++++++ 1 file changed, 6 insertions(+) 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(); -- 2.7.4