Fix world importer breaking if there are no files to import
This commit is contained in:
@@ -120,9 +120,13 @@ public class WorldImporter implements IDataImporter {
|
||||
|
||||
@Override
|
||||
public void runImport(IUpdateCallback updateCallback, ICompletionCallback completionCallback) {
|
||||
if (this.isRunning || this.worker == null) {
|
||||
if (this.isRunning) {
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
if (this.worker == null) {//Can happen if no files
|
||||
completionCallback.onCompletion(0);
|
||||
return;
|
||||
}
|
||||
this.isRunning = true;
|
||||
this.updateCallback = updateCallback;
|
||||
this.completionCallback = completionCallback;
|
||||
|
||||
Reference in New Issue
Block a user