Browse Source

recover a lost null check

UbitUmarov 6 years ago
parent
commit
ae04a24e7a
1 changed files with 2 additions and 1 deletions
  1. 2 1
      OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs

+ 2 - 1
OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs

@@ -340,7 +340,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
             faces = new List<Face>();
             OSD meshOsd = null;
 
-            if (primShape.SculptData.Length <= 0)
+            if (primShape.SculptData == null || primShape.SculptData.Length <= 0)
             {
 //                m_log.InfoFormat("[MESH]: asset data for {0} is zero length", primName);
                 return false;
@@ -363,6 +363,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
                 catch (Exception e)
                 {
                     m_log.Error("[MESH]: Exception deserializing mesh asset header:" + e.ToString());
+                    return false;
                 }
 
                 start = data.Position;