Added a check for a NULL pointer in CoFreeUnusedLibraries.

This commit is contained in:
Francis Beaudet 1999-04-22 09:10:16 +00:00 committed by Alexandre Julliard
parent 12323e4fca
commit 9bf93c6e19

View file

@ -1583,7 +1583,8 @@ void WINAPI CoFreeUnusedLibraries(void)
DllCanUnloadNow = (DllCanUnloadNowFunc)
GetProcAddress(ptr->hLibrary, "DllCanUnloadNow");
if (DllCanUnloadNow() == S_OK) {
if ( (DllCanUnloadNow != NULL) &&
(DllCanUnloadNow() == S_OK) ) {
tmp=ptr->next;
CoFreeLibrary(ptr->hLibrary);
ptr = tmp;