From 28d48a76e34811b4385afea1a570de3ba561447c Mon Sep 17 00:00:00 2001 From: boatbomber Date: Wed, 12 Jul 2023 10:01:21 -0700 Subject: [PATCH] Fix tooltips crashing on thread cancellation edge cases (#727) --- plugin/src/App/Components/Tooltip.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/src/App/Components/Tooltip.lua b/plugin/src/App/Components/Tooltip.lua index aa88d9b66..9c1fb1517 100644 --- a/plugin/src/App/Components/Tooltip.lua +++ b/plugin/src/App/Components/Tooltip.lua @@ -175,7 +175,7 @@ end function Trigger:willUnmount() if self.showDelayThread then - task.cancel(self.showDelayThread) + pcall(task.cancel, self.showDelayThread) end if self.destroy then self.destroy() @@ -225,7 +225,7 @@ function Trigger:managePopup() end) else if self.showDelayThread then - task.cancel(self.showDelayThread) + pcall(task.cancel, self.showDelayThread) self.showDelayThread = nil end self.props.context.removeTip(self.id)