Patch NPE

This commit is contained in:
CocoTheOwner 2021-02-23 21:01:19 +01:00
parent 685de56fbb
commit b1d25ec35c

View File

@ -40,10 +40,15 @@ public class J
public static boolean doif(Supplier<Boolean> c, Runnable g)
{
if(c.get())
{
g.run();
return true;
try {
if (c.get()) {
g.run();
return true;
}
}
catch (NullPointerException e) {
// TODO: Fix this because this is just a suppression for an NPE on g
return false;
}
return false;