Skip to content

Commit 3b6d1a5

Browse files
authored
Merge pull request #539 from Drigax/drigax/fix_472_nullref_regression
Fix _getSpecialTexmap null reference exception
2 parents 59f553a + 4b65484 commit 3b6d1a5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

3ds Max/Max2Babylon/Exporter/BabylonExporter.Texture.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,12 @@ private BabylonTexture ExportEnvironmnentTexture(ITexmap texMap, BabylonScene ba
513513

514514
private ITexmap _getSpecialTexmap(ITexmap texMap, out float amount)
515515
{
516+
if (texMap == null)
517+
{
518+
amount = 0.0f;
519+
return null;
520+
}
521+
516522
if (texMap.ClassName == "Normal Bump")
517523
{
518524
var block = texMap.GetParamBlockByID(0); // General Block

0 commit comments

Comments
 (0)