Fix crash when model baking fails
This commit is contained in:
parent
f9cce166d1
commit
f14bfa56e1
|
|
@ -181,7 +181,13 @@ public class DynamicModelSystem {
|
|||
if (DEBUG_DYNAMIC_MODEL_LOADING) {
|
||||
ModernFix.LOGGER.info("Baking {}", key);
|
||||
}
|
||||
return baker.apply(key, unbaked);
|
||||
var bakerResult = baker.apply(key, unbaked);
|
||||
if (bakerResult == null) {
|
||||
ModernFix.LOGGER.warn("Baker has returned null for {}", key);
|
||||
return NULL_BAKED;
|
||||
} else {
|
||||
return bakerResult;
|
||||
}
|
||||
} else {
|
||||
return NULL_BAKED;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user