forked from Limework/skript-db
		
	add null check on locals
This commit is contained in:
		
							parent
							
								
									131ab77c91
								
							
						
					
					
						commit
						4499355148
					
				@ -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 {
 | 
				
			|||||||
                        });
 | 
					                        });
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user