From 3feb3aa3c1631c1a065f3476f832acf265866540 Mon Sep 17 00:00:00 2001 From: rarified Date: Sun, 26 Jul 2020 09:06:15 -0600 Subject: [PATCH] Fix optimization in FindPage() that might attempt to use a plPageInfo class before checking it is valid. --- .../Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp index 92313fd9..429e6df7 100644 --- a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp +++ b/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;