Check for null help URL

This commit is contained in:
Cameron Gutman 2019-01-04 23:06:37 -08:00
parent 3c92a79fe2
commit 106960cbb5

View File

@ -56,6 +56,10 @@ VOID CALLBACK MsgBoxHelpCallback(LPHELPINFO lpHelpInfo)
{
const char* helpUrl = (const char*)lpHelpInfo->dwContextId;
if (!helpUrl) {
return;
}
// It's recommended to initialize COM before calling ShellExecute()
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
ShellExecuteA(nullptr, "open", helpUrl, nullptr, nullptr, SW_SHOWNORMAL);