mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-27 06:20:02 +00:00
Patch NPE
This commit is contained in:
1 parent
685de56fbb
commit
b1d25ec35c
1 file changed
+7
-2
@@ -40,11 +40,16 @@ public class J
|
|||||||
|
|
||||||
public static boolean doif(Supplier<Boolean> c, Runnable g)
|
public static boolean doif(Supplier<Boolean> c, Runnable g)
|
||||||
{
|
{
|
||||||
if(c.get())
|
try {
|
||||||
{
|
if (c.get()) {
|
||||||
g.run();
|
g.run();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch (NullPointerException e) {
|
||||||
|
// TODO: Fix this because this is just a suppression for an NPE on g
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user