From ea34ecc9ec78882d8aff6e297ab57d5b22df3005 Mon Sep 17 00:00:00 2001 From: "Carl J. Bialorucki" Date: Sun, 14 Apr 2024 17:08:01 -0600 Subject: [PATCH] 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 55343f04b084931a20c396b76645f38cad94ea1b --- base/shell/explorer/tbsite.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/shell/explorer/tbsite.cpp b/base/shell/explorer/tbsite.cpp index 387cdb4d188..a842509d5da 100644 --- a/base/shell/explorer/tbsite.cpp +++ b/base/shell/explorer/tbsite.cpp @@ -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))) {