Improve some bad stack traces.

Idk why this happens.
This commit is contained in:
modmuss50 2021-07-13 00:05:24 +01:00
parent f13dc4eea7
commit ad5ac78e06

View file

@ -114,6 +114,13 @@ public final class LoomTasks {
project.afterEvaluate(p -> {
MappingsProviderImpl mappingsProvider = extension.getMappingsProvider();
if (mappingsProvider.mappedProvider == null) {
// If this is ever null something has gone badly wrong,
// for some reason for another this afterEvaluate still gets called when something has gone badly
// wrong, returning here seems to produce nicer errors.
return;
}
File inputJar = mappingsProvider.mappedProvider.getMappedJar();
if (mappingsProvider.hasUnpickDefinitions()) {