From 0fc55818ca8020c166632821b087473ca21d3e9a Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Wed, 3 Sep 2008 10:53:25 +0000 Subject: Mantis #2109 Prevent a null reference exception when reset is pressed on a script while it's being compiled. --- OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'OpenSim/Region/ScriptEngine/Shared/Instance') diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs index 6b674f3..311ec86 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs @@ -571,6 +571,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance public void ResetScript() { + if (m_script == null) + return; bool running = Running; RemoveState(); -- cgit v1.1