Fix rare WMI providers tab crash
* Process Hacker -
* Process properties: WMI Providor page
*
- * Copyright (C) 2017 dmex
+ * Copyright (C) 2017-2019 dmex
*
* This file is part of Process Hacker.
*
@@ -255,8 +255,12 @@ HRESULT PhpQueryWmiProviderFileName(
VARIANT variant;
if (SUCCEEDED(IWbemClassObject_Get(wbemClassObject, L"CLSID", 0, &variant, 0, 0)))
+ {
+ if (variant.bstrVal) // returns NULL for some host processes (dmex)
{
clsidString = PhCreateString(variant.bstrVal);
+ }
+
VariantClear(&variant);
}
