From 585fb89154da1dd79cedaa1ba0a2342571a7b0f4 Mon Sep 17 00:00:00 2001 From: Malcolm Tyrrell Date: Fri, 2 Oct 2020 15:25:16 +0100 Subject: [PATCH] Make an assert a DeadlyImportError. --- code/AssetLib/FBX/FBXImporter.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/AssetLib/FBX/FBXImporter.cpp b/code/AssetLib/FBX/FBXImporter.cpp index f80b65cd4..fc3b85ef5 100644 --- a/code/AssetLib/FBX/FBXImporter.cpp +++ b/code/AssetLib/FBX/FBXImporter.cpp @@ -187,6 +187,10 @@ void FBXImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy // size relative to cm float size_relative_to_cm = doc.GlobalSettings().UnitScaleFactor(); + if (size_relative_to_cm == 0.0) + { + ThrowException("The UnitScaleFactor must be non-zero"); + } // Set FBX file scale is relative to CM must be converted to M for // assimp universal format (M)