From 6a8fe8a84e257e4991b2d8bf1e8bac1d989aabe3 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Mon, 20 Apr 2009 13:56:16 +0000
Subject: Prevent a null ref if a notecard is not found

---
 OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'OpenSim')

diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 56d7d50..ae4fcbc 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;
 
-- 
cgit v1.1