summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRye Mutt <rye@alchemyviewer.org>2022-10-19 19:42:14 -0400
committerRye Mutt <rye@alchemyviewer.org>2022-10-19 19:42:14 -0400
commita15410468b49125af36672fa20845da65f216dcc (patch)
tree0f6d0126b821998fadb6203518a4fdad9acfd182
parent22dc6de993cfc3de497edbce998a2bad719809d0 (diff)
Fix use after free in LLWorld::removeRegion
-rw-r--r--indra/newview/llworld.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index 8abb49fba8..95cb98cad2 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -293,13 +293,13 @@ void LLWorld::removeRegion(const LLHost &host)
mRegionRemovedSignal(regionp);
- delete regionp;
-
updateWaterObjects();
//double check all objects of this region are removed.
gObjectList.clearAllMapObjectsInRegion(regionp) ;
//llassert_always(!gObjectList.hasMapObjectInRegion(regionp)) ;
+
+ delete regionp; // Delete last to prevent use after free
}