Browse Source

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.
rarified/findpagevalidate
rarified 4 years ago
parent
commit
870f6352b5
  1. 4
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp

4
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp

@ -1627,12 +1627,16 @@ plRegistryPageNode* plResManager::FindPage(const plLocation& location) const
PageSet::const_iterator it; PageSet::const_iterator it;
for (it = fAllPages.begin(); it != fAllPages.end(); it++) for (it = fAllPages.begin(); it != fAllPages.end(); it++)
{ {
if ((*it)->IsValid()) {
const plLocation& pageloc = (*it)->GetPageInfo().GetLocation(); const plLocation& pageloc = (*it)->GetPageInfo().GetLocation();
if (pageloc == location) if (pageloc == location)
{ {
fLastFoundPage = *it; fLastFoundPage = *it;
return fLastFoundPage; return fLastFoundPage;
} }
} else {
hsStatusMessageF("Invalid Page on fAllPages @0x%x state=0x%x\n", (*it), (*it)->GetPageCondition());
}
} }
return nil; return nil;

Loading…
Cancel
Save