From f17732346e00ba73ce1c8508849b3fe5c72b9298 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Thu, 2 Apr 2009 16:27:16 +0000 Subject: Fix a nullref when compiling non-LSL scripts --- OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared') diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs index 6964490..162f323 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs @@ -644,12 +644,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools sfs.Close(); string posmap = String.Empty; - foreach (KeyValuePair, KeyValuePair> kvp in m_positionMap) + if (m_positionMap != null) { - KeyValuePair k = kvp.Key; - KeyValuePair v = kvp.Value; - posmap += String.Format("{0},{1},{2},{3}\n", - k.Key, k.Value, v.Key, v.Value); + foreach (KeyValuePair, KeyValuePair> kvp in m_positionMap) + { + KeyValuePair k = kvp.Key; + KeyValuePair v = kvp.Value; + posmap += String.Format("{0},{1},{2},{3}\n", + k.Key, k.Value, v.Key, v.Value); + } } buf = enc.GetBytes(posmap); -- cgit v1.1