nvm it is safe to delete nullptr

This commit is contained in:
Akash Mozumdar 2018-12-03 18:44:08 -05:00
parent aae330ebef
commit 4efaa9f34f
2 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ BOOL WINAPI DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved
break;
case DLL_PROCESS_DETACH:
{
if (lpReserved == NULL && w != nullptr) delete w; // https://blogs.msdn.microsoft.com/oldnewthing/20120105-00/?p=8683
if (lpReserved == NULL) delete w; // https://blogs.msdn.microsoft.com/oldnewthing/20120105-00/?p=8683
}
break;
}

View File

@ -15,7 +15,7 @@ BOOL WINAPI DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved
break;
case DLL_PROCESS_DETACH:
{
if (lpReserved == NULL && w != nullptr) delete w; // https://blogs.msdn.microsoft.com/oldnewthing/20120105-00/?p=8683
if (lpReserved == NULL) delete w; // https://blogs.msdn.microsoft.com/oldnewthing/20120105-00/?p=8683
}
break;
}