Skip to content

Commit

Permalink
[NUI] Fix crash on ScrollableBase.Dispose()
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Jaehyun-Cho authored and everLEEst committed Oct 27, 2022
1 parent b9838b1 commit 298213c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Tizen.NUI.Components/Controls/ScrollableBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1342,8 +1342,8 @@ protected override void Dispose(DisposeTypes type)

if (propertyNotification != null)
{
ContentContainer?.RemovePropertyNotification(propertyNotification);
propertyNotification.Notified -= OnPropertyChanged;
Interop.Handle.RemovePropertyNotifications(propertyNotification.SwigCPtr);
propertyNotification.Dispose();
propertyNotification = null;
}
Expand Down

0 comments on commit 298213c

Please sign in to comment.