From: dongsug.song Date: Thu, 28 Mar 2024 12:33:00 +0000 (+0900) Subject: [NUI] Fix manual TCT crash issue only on TV target X-Git-Tag: submit/tizen/20240328.125227~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6420c380b4338a1e65e6fa9385af6eac22ceb21f;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] Fix manual TCT crash issue only on TV target --- 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; }