[BUGFIX] Fixed null pointer on debug

This commit is contained in:
Jeroen Ketelaar
2019-05-13 18:22:59 -05:00
parent 87e38f51b8
commit 59d4e2fa58
@@ -160,14 +160,7 @@ public final class ScriptSelector extends JFrame {
@Override
public void actionPerformed(ActionEvent e) {
String s = getScriptName(tree.getSelectionPath().toString());
if (s != null) {
try {
WebUtil.getContents("http://bdn.parabot.org/api/v2/scripts/local", "script=" + URLEncoder.encode(s, "UTF-8") + "&username=" + URLEncoder.encode(Context.getUsername(), "UTF-8"));
} catch (MalformedURLException | UnsupportedEncodingException e1) {
e1.printStackTrace();
}
runScript(format.get(s));
}
runScript(format.get(s));
}
});