1
0
Fork 0
4Creative-Changes/Patch/0001-fix-npe-in-ubode.patch

34 lines
1.2 KiB
Diff
Raw Normal View History

2020-06-27 23:20:23 +00:00
From 8fb0b4b9b2a6b209fa34097b0284112abbbcae97 Mon Sep 17 00:00:00 2001
From: Christopher <git@clatza.dev>
Date: Sun, 28 Jun 2020 01:19:29 +0200
Subject: [PATCH] fix npe
---
.../Region/PhysicsModules/Meshing/Meshmerizer/Mesh.cs | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Mesh.cs b/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Mesh.cs
index 42ba37e585..0cec93760e 100644
--- a/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Mesh.cs
+++ b/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Mesh.cs
@@ -284,9 +284,13 @@ namespace OpenSim.Region.PhysicsModule.Meshing
for (int i = 0; i < m_triangles.Count; i++)
{
Triangle t = m_triangles[i];
- result[3 * i + 0] = m_vertices[t.v1];
- result[3 * i + 1] = m_vertices[t.v2];
- result[3 * i + 2] = m_vertices[t.v3];
+
+ if(t != null)
+ {
+ result[3 * i + 0] = m_vertices[t.v1];
+ result[3 * i + 1] = m_vertices[t.v2];
+ result[3 * i + 2] = m_vertices[t.v3];
+ }
}
return result;
}
--
2.27.0.windows.1