From 4921078d1e106b37d35f258ab4368c490fd3a1cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=80=D0=B0=D0=BD=D0=B8=D0=BC=D0=B8=D1=80=20=D0=9A?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=9F=D0=B8=D1=9B?= Date: Wed, 14 Sep 2022 20:56:23 -0700 Subject: [PATCH] Fix bx::dlclose when passing NULL handle. --- src/os.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/os.cpp b/src/os.cpp index 4183782..5d85880 100644 --- a/src/os.cpp +++ b/src/os.cpp @@ -191,6 +191,11 @@ namespace bx void dlclose(void* _handle) { + if (NULL == _handle) + { + return; + } + #if BX_PLATFORM_WINDOWS ::FreeLibrary( (HMODULE)_handle); #elif BX_PLATFORM_EMSCRIPTEN \