From 6a8fe8a84e257e4991b2d8bf1e8bac1d989aabe3 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 20 Apr 2009 13:56:16 +0000 Subject: [PATCH] Prevent a null ref if a notecard is not found --- .../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 56d7d50778..ae4fcbc443 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -9209,6 +9209,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api WithNotecard(assetID, delegate (UUID id, AssetBase a) { + if (a == null) + return; + if (a.Type != 7) return; @@ -9283,6 +9286,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api WithNotecard(assetID, delegate (UUID id, AssetBase a) { + if (a == null) + return; + if (a.Type != 7) return;