diff --git a/source/engine/import/importer.js b/source/engine/import/importer.js index 14b8f56..d5d7e7e 100644 --- a/source/engine/import/importer.js +++ b/source/engine/import/importer.js @@ -199,7 +199,7 @@ export class Importer { if (mainFile === null || mainFile.file === null || mainFile.file.content === null) { let error = new ImportError (ImportErrorCode.FailedToLoadFile); - if (mainFile.file !== null) { + if (mainFile !== null && mainFile.file !== null) { error.mainFile = mainFile.file.name; } callbacks.onImportError (error);