From: Jaehyun Cho Date: Thu, 27 Oct 2022 02:28:39 +0000 (+0900) Subject: [NUI] Fix crash on ScrollableBase.Dispose() X-Git-Tag: accepted/tizen/7.0/unified/20221103.165518~1^2~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=88b2b690c70e6d882508b963ce3b8ee69aa394a5;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] Fix crash on ScrollableBase.Dispose() In ScrollableBase.Dispose(), propertyNotification is disposed as well. To dispose propertyNotification, RemovePropertyNotifications was called inappropriately and it caused crash. To resolve the above, RemovePropertyNotification is called by ContentContainer with propertyNotification like AddPropertyNotification is called by ContentContainer with propertyNotification. --- diff --git a/src/Tizen.NUI.Components/Controls/ScrollableBase.cs b/src/Tizen.NUI.Components/Controls/ScrollableBase.cs index bfac755..0f2f477 100755 --- a/src/Tizen.NUI.Components/Controls/ScrollableBase.cs +++ b/src/Tizen.NUI.Components/Controls/ScrollableBase.cs @@ -1342,8 +1342,8 @@ namespace Tizen.NUI.Components if (propertyNotification != null) { + ContentContainer?.RemovePropertyNotification(propertyNotification); propertyNotification.Notified -= OnPropertyChanged; - Interop.Handle.RemovePropertyNotifications(propertyNotification.SwigCPtr); propertyNotification.Dispose(); propertyNotification = null; }