From d2190074a9da36bb90e5a019712bc72d233c2282 Mon Sep 17 00:00:00 2001 From: dongsug-song <35130733+dongsug-song@users.noreply.github.com> Date: Thu, 13 Feb 2020 22:55:00 +0900 Subject: [PATCH] [NUI] Fix TCT crash issue (#1403) --- src/Tizen.NUI/src/public/Animation.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Tizen.NUI/src/public/Animation.cs b/src/Tizen.NUI/src/public/Animation.cs index 59fa58a..682f2b4 100755 --- a/src/Tizen.NUI/src/public/Animation.cs +++ b/src/Tizen.NUI/src/public/Animation.cs @@ -1288,15 +1288,17 @@ namespace Tizen.NUI return; } - if (_finishedCallbackOfNative != null) + if (_animationFinishedEventHandler != null) { FinishedSignal().Disconnect(_finishedCallbackOfNative); + _animationFinishedEventHandler = null; } if (_animationProgressReachedEventCallback != null) { ProgressReachedSignal().Disconnect(_animationProgressReachedEventCallback); + _animationProgressReachedEventCallback = null; } base.Dispose(type); @@ -1306,6 +1308,11 @@ namespace Tizen.NUI [EditorBrowsable(EditorBrowsableState.Never)] protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr) { + if(swigCPtr.Handle == IntPtr.Zero || this.HasBody() == false) + { + Tizen.Log.Fatal("NUI", $"[ERROR] Animation ReleaseSwigCPtr()! IntPtr=0x{swigCPtr.Handle:X} HasBody={this.HasBody()}"); + return; + } Interop.Animation.delete_Animation(swigCPtr); } -- 2.7.4