Fix crash on exit

This commit is contained in:
Brahim Hadriche committed 2023-09-07 21:10:59 -04:00
1 parent 703fea1bab
commit 9dab7d9394
3 files changed
+6 -11

No files matched your search

@@ -23,7 +23,11 @@ function GetComponentName(taskFunc as object) as string
if IsString(taskFunc)
return `${taskFunc}_asynctask`
end if
return `${FuncName(taskFunc)}_asynctask`
' NOTE: do NOT use FuncName in here.
' we use:
' return `${FuncName(taskFunc)}_asynctask`
' The app hangs on exit, and the TV crashes and restarts. I'm not kidding.
return (LCase(`${taskFunc}_asynctask`)).replace("function:", "").trim()
end function
function OnTaskState(e as object) as void
+1 -5
View File
@@ -35,9 +35,5 @@ function ValidInt(obj as dynamic) as integer
end function
function FuncName(func as function) as string
if func <> invalid and GetInterface(func, "ifToStr") <> invalid
return func.toStr().replace("Function: ", "")
end if
return ""
return (LCase(`${func}`)).replace("function:", "").trim()
end function