From 5c4056660fe7678315716e52cfe57da0ba448efe Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 16 Dec 2011 21:16:01 +0000 Subject: [PATCH] Don't pass on ChaneWaterHeight event from EventManager is new water height is less than 0 This is to stop bad values and subsequent viewer crashes. Thanks to Michelle Argus for this patch. --- OpenSim/Region/Framework/Scenes/EventManager.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index 4a4d98fa74..4f71915fe8 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs @@ -1564,6 +1564,12 @@ namespace OpenSim.Region.Framework.Scenes public void TriggerRequestChangeWaterHeight(float height) { + if (height < 0) + { + // ignore negative water height + return; + } + RequestChangeWaterHeight handlerRequestChangeWaterHeight = OnRequestChangeWaterHeight; if (handlerRequestChangeWaterHeight != null) {