2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-14 02:27:40 -04:00

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

before checking it is valid.
This commit is contained in:
rarified
2020-07-26 09:06:15 -06:00
parent b0f48722b6
commit 3feb3aa3c1

View File

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