Browse Source

Fix optimization in FindPage() that might attempt to use a plPageInfo class

before checking it is valid.
rarified/movieplayer
rarified 4 years ago
parent
commit
3feb3aa3c1
  1. 2
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp

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

@ -1621,7 +1621,7 @@ void plResManager::UnloadPageObjects(plRegistryPageNode* pageNode, UInt16 classI
plRegistryPageNode* plResManager::FindPage(const plLocation& location) const
{
// Quick optimization
if (fLastFoundPage != nil && fLastFoundPage->GetPageInfo().GetLocation() == location)
if (fLastFoundPage != nil && fLastFoundPage->IsValid() && fLastFoundPage->GetPageInfo().GetLocation() == location)
return fLastFoundPage;
PageSet::const_iterator it;

Loading…
Cancel
Save