Check if dwBandID is NULL before getting band object (#6738)

fixes CORE-18807 'Our explorer.exe ATL-asserts when executed on XPSP3'
which most likely got unhidden when we enabled the ATL-assertions in
0.4.15-dev-5023-g 55343f04b0
This commit is contained in:
Carl J. Bialorucki
2024-04-14 17:08:01 -06:00
committed by GitHub
parent b1de3bfb2b
commit ea34ecc9ec

View File

@@ -459,7 +459,7 @@ public:
/* Enumerate all bands */
while (SUCCEEDED(m_BandSite->EnumBands(uBand, &dwBandID)))
{
if (SUCCEEDED(m_BandSite->GetBandObject(dwBandID, IID_PPV_ARG(IPersist, &pBand))))
if (dwBandID && SUCCEEDED(m_BandSite->GetBandObject(dwBandID, IID_PPV_ARG(IPersist, &pBand))))
{
if (SUCCEEDED(pBand->GetClassID(&BandCLSID)))
{