From a13b4a8296a8623cb50a4ec5d23a1e39b3e019c0 Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Thu, 30 Jan 2025 16:05:59 -0500 Subject: editor: better teardown handling --- editor/editor.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'editor') diff --git a/editor/editor.cpp b/editor/editor.cpp index bc5d072..b3d0f4a 100644 --- a/editor/editor.cpp +++ b/editor/editor.cpp @@ -1521,7 +1521,8 @@ void PkeEditor_Setup() { void PkeEditor_Disable() { shouldDisableEditor = false; - PkeInput_DeactivateSet(debugControlsHandle); + if (debugControlsHandle != InputActionSetHandle_MAX) + PkeInput_DeactivateSet(debugControlsHandle); } void PkeEditor_Teardown() { @@ -1529,7 +1530,8 @@ void PkeEditor_Teardown() { if (subProgramPid != -1) { kill(subProgramPid, SIGINT); } - PkeThreads_Teardown(threadPoolHandle); + if (threadPoolHandle != ThreadPoolHandle_MAX) + PkeThreads_Teardown(threadPoolHandle); entityInstancesToCreate.~DynArray(); } -- cgit v1.2.3