Question about getOwningFile() nullability validity in ModListScreen.java #2274
denkisikinoneko
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I'm uncertain if this is the right place to bring this up, and I'm not very certain if a pull request would be fine for me to make; but I'm currently doing some run-time modifications to NeoForge for compatibility with a mini-modloader I'm making, and on ModListScreen.java, method updateCache()V:
.getOwningFile()on the first line here is checked for null, but it's then followed by the chained call.getLicense()a few lines below, causing a game crash if it is, in fact, null.java.lang.NullPointerException: Cannot invoke "net.neoforged.neoforgespi.language.IModFileInfo.getLicense()" because the return value of "net.neoforged.neoforgespi.language.IModInfo.getOwningFile()" is null[the un-owned mod views fine upon opening the mod list, but crashes upon clicking on it for license info]Is this intentional? It seems like an oversight.
Beta Was this translation helpful? Give feedback.
All reactions