Fix tooltips crashing on thread cancellation edge cases (#727)

This commit is contained in:
boatbomber 2023-07-12 10:01:21 -07:00 • committed by GitHub
parent 80eb14f9da
commit 28d48a76e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -175,7 +175,7 @@ end
function Trigger:willUnmount() function Trigger:willUnmount()
if self.showDelayThread then if self.showDelayThread then
task.cancel(self.showDelayThread) pcall(task.cancel, self.showDelayThread)
end end
if self.destroy then if self.destroy then
self.destroy() self.destroy()
@ -225,7 +225,7 @@ function Trigger:managePopup()
end) end)
else else
if self.showDelayThread then if self.showDelayThread then
task.cancel(self.showDelayThread) pcall(task.cancel, self.showDelayThread)
self.showDelayThread = nil self.showDelayThread = nil
end end
self.props.context.removeTip(self.id) self.props.context.removeTip(self.id)