From 870f6352b5b5f67938e1aabf0fb95e94a241810b Mon Sep 17 00:00:00 2001 From: rarified Date: Wed, 19 Aug 2020 15:45:00 -0600 Subject: [PATCH] More fixes to plResManager::FindPage() - it appears invalid pages can exist on the fAllPages list. Validate each one when the list(set) is walked before operating on it. --- .../Plasma/PubUtilLib/plResMgr/plResManager.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp index 429e6df7..71977ecc 100644 --- a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp +++ b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp @@ -1627,11 +1627,15 @@ plRegistryPageNode* plResManager::FindPage(const plLocation& location) const PageSet::const_iterator it; for (it = fAllPages.begin(); it != fAllPages.end(); it++) { - const plLocation& pageloc = (*it)->GetPageInfo().GetLocation(); - if (pageloc == location) - { - fLastFoundPage = *it; - return fLastFoundPage; + if ((*it)->IsValid()) { + const plLocation& pageloc = (*it)->GetPageInfo().GetLocation(); + if (pageloc == location) + { + fLastFoundPage = *it; + return fLastFoundPage; + } + } else { + hsStatusMessageF("Invalid Page on fAllPages @0x%x state=0x%x\n", (*it), (*it)->GetPageCondition()); } }