summaryrefslogtreecommitdiff
path: root/indra/newview/llworld.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llworld.cpp')
-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 aa32ef04b2..fb9f5f41e6 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
}