add null check on locals

This commit is contained in:
Govindas 2021-06-24 15:21:06 +03:00
parent 2dcd4edf58
commit 2a4d7f6a6d

View File

@ -105,7 +105,7 @@ public class EffExecuteStatement extends Effect {
if (getNext() != null) { if (getNext() != null) {
//if local variables are present //if local variables are present
if (locals != null) if (locals != null) {
//bring back local variables //bring back local variables
//populate SQL data into variables //populate SQL data into variables
@ -121,7 +121,6 @@ public class EffExecuteStatement extends Effect {
//SkriptDB.getPlugin(SkriptDB.class).getServer().getPluginManager().callEvent(event); //SkriptDB.getPlugin(SkriptDB.class).getServer().getPluginManager().callEvent(event);
} }
if (isSync || finalSync) { if (isSync || finalSync) {
Variables.setLocalVariables(e, locals); Variables.setLocalVariables(e, locals);
if (!(res instanceof String)) { if (!(res instanceof String)) {
((Map<String, Object>) res).forEach((name, value) -> setVariable(e, name, value)); ((Map<String, Object>) res).forEach((name, value) -> setVariable(e, name, value));
@ -142,6 +141,7 @@ public class EffExecuteStatement extends Effect {
}); });
} }
} }
}
}); });
} }