Skip to content

Commit

Permalink
Merge pull request #539 from Drigax/drigax/fix_472_nullref_regression
Browse files Browse the repository at this point in the history
Fix _getSpecialTexmap null reference exception
  • Loading branch information
Drigax authored Jun 11, 2019
2 parents 59f553a + 4b65484 commit 3b6d1a5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions 3ds Max/Max2Babylon/Exporter/BabylonExporter.Texture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,12 @@ private BabylonTexture ExportEnvironmnentTexture(ITexmap texMap, BabylonScene ba

private ITexmap _getSpecialTexmap(ITexmap texMap, out float amount)
{
if (texMap == null)
{
amount = 0.0f;
return null;
}

if (texMap.ClassName == "Normal Bump")
{
var block = texMap.GetParamBlockByID(0); // General Block
Expand Down

0 comments on commit 3b6d1a5

Please sign in to comment.