From 6420c380b4338a1e65e6fa9385af6eac22ceb21f Mon Sep 17 00:00:00 2001 From: "dongsug.song" Date: Thu, 28 Mar 2024 21:33:00 +0900 Subject: [PATCH] [NUI] Fix manual TCT crash issue only on TV target --- src/Tizen.NUI.Components/Controls/Control.cs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/Tizen.NUI.Components/Controls/Control.cs b/src/Tizen.NUI.Components/Controls/Control.cs index 3007d93..eec308f 100755 --- a/src/Tizen.NUI.Components/Controls/Control.cs +++ b/src/Tizen.NUI.Components/Controls/Control.cs @@ -164,13 +164,24 @@ namespace Tizen.NUI.Components private bool OnTouchPlayFeedback(object source, TouchEventArgs e) { - if (Feedback && e?.Touch.GetState(0) == PointStateType.Down) + try { - if (feedback != null && feedback.IsSupportedPattern(FeedbackType.Sound, "Tap")) + if (Feedback && e?.Touch.GetState(0) == PointStateType.Down) { - feedback.Play(FeedbackType.Sound, "Tap"); + if (feedback != null && feedback.IsSupportedPattern(FeedbackType.Sound, "Tap")) + { + feedback.Play(FeedbackType.Sound, "Tap"); + } } } + catch (NotSupportedException ex) + { + Log.Error("NUI", $"[ERROR] No support of Feedback: {ex}"); + } + catch (InvalidOperationException ex) + { + Log.Error("NUI", $"[ERROR] Fail to initialize Feedback: {ex}"); + } return false; } -- 2.7.4