Prevent crash when no importable objects found.

This commit is contained in:
kovacsv 2022-10-10 17:35:45 +02:00
parent 98889adb95
commit d7345647fc

View File

@ -332,6 +332,12 @@ export class ImporterFcstd extends ImporterBase
}
let objectsToConvert = this.document.GetObjectListToConvert ();
if (objectsToConvert.length === 0) {
this.SetError ('No importable object found.');
onFinish ();
return;
}
this.ConvertObjects (objectsToConvert, onFinish);
}