From 54da64acacec9703b95f375aab58890766cc16a4 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Tue, 20 Jul 2010 00:46:39 +0200 Subject: Remove exception badness in the LSL Types. Who ever came up with that.....?! --- OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs index c9049e2..bab5156 100644 --- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs @@ -615,10 +615,10 @@ namespace OpenSim.Region.ScriptEngine.Shared { int la = -1; int lb = -1; - try { la = a.Length; } - catch (NullReferenceException) { } - try { lb = b.Length; } - catch (NullReferenceException) { } + if (a != null) + la = a.Length; + if (b != null) + lb = b.Length; return la == lb; } @@ -627,10 +627,10 @@ namespace OpenSim.Region.ScriptEngine.Shared { int la = -1; int lb = -1; - try { la = a.Length; } - catch (NullReferenceException) { } - try {lb = b.Length;} - catch (NullReferenceException) { } + if (a != null) + la = a.Length; + if (b != null) + lb = b.Length; return la != lb; } -- cgit v1.1