From 424994c933c690d2ac5ac7fdf56857e1344f73b0 Mon Sep 17 00:00:00 2001 From: Tim Clem Date: Thu, 13 Jul 2023 14:16:24 -0700 Subject: [PATCH] wmp: Don't release a NULL typelib. --- dlls/wmp/wmp_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/wmp/wmp_main.c b/dlls/wmp/wmp_main.c index 1f2afd8b244..2edaaf46df2 100644 --- a/dlls/wmp/wmp_main.c +++ b/dlls/wmp/wmp_main.c @@ -89,7 +89,8 @@ static void release_typelib(void) if (typeinfos[i]) ITypeInfo_Release(typeinfos[i]); - ITypeLib_Release(typelib); + if (typelib) + ITypeLib_Release(typelib); } static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv) @@ -154,6 +155,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) wmp_instance = hInstDLL; break; case DLL_PROCESS_DETACH: + if (lpv) break; unregister_wmp_class(); unregister_player_msg_class(); release_typelib(); -- 2.11.4.GIT