Explorar o código

Fix bx::dlclose when passing NULL handle.

Бранимир Караџић %!s(int64=3) %!d(string=hai) anos
pai
achega
4921078d1e
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      src/os.cpp

+ 5 - 0
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 \