Fixed crash in BVHDecoder - ReadBytesUntilNull was reading until newline instead of null
Fixed crash in PrimMesher - Profile::Copy was not copying correctly Fixed crash in PrmiMesher - SculptMap::ScaleImage was disposing live SKBitmap's
This commit is contained in:
@@ -181,7 +181,7 @@ namespace OpenMetaverse
|
||||
for (var j = i; j < data.Length; j++)
|
||||
{
|
||||
char spot = Convert.ToChar(data[j]);
|
||||
if (spot == '\n')
|
||||
if (spot == '\0')
|
||||
{
|
||||
endpos = j;
|
||||
break;
|
||||
|
||||
@@ -1058,7 +1058,9 @@ namespace LibreMetaverse.PrimMesher
|
||||
|
||||
if (needFaces)
|
||||
copy.faces.AddRange(faces);
|
||||
if (copy.calcVertexNormals == calcVertexNormals)
|
||||
|
||||
copy.calcVertexNormals = calcVertexNormals;
|
||||
if (calcVertexNormals)
|
||||
{
|
||||
copy.vertexNormals.AddRange(vertexNormals);
|
||||
copy.faceNormal = faceNormal;
|
||||
|
||||
@@ -121,6 +121,10 @@ namespace LibreMetaverse.PrimMesher
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
if (needsScaling)
|
||||
{
|
||||
bm.Dispose();
|
||||
}
|
||||
throw new Exception("Caught exception processing byte arrays in SculptMap(): e: " + e);
|
||||
}
|
||||
|
||||
@@ -129,6 +133,11 @@ namespace LibreMetaverse.PrimMesher
|
||||
width++;
|
||||
height++;
|
||||
}
|
||||
|
||||
if (needsScaling)
|
||||
{
|
||||
bm.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
public List<List<Coord>> ToRows(bool mirror)
|
||||
@@ -167,7 +176,6 @@ namespace LibreMetaverse.PrimMesher
|
||||
var info = new SKImageInfo(destWidth, destHeight);
|
||||
var scaledImage = new SKBitmap(info);
|
||||
srcImage.ScalePixels(scaledImage.PeekPixels(), new SKSamplingOptions(SKFilterMode.Linear));
|
||||
srcImage.Dispose();
|
||||
return scaledImage;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user