Merge pull request #311 from Parabot/bugfix/debug

[BUGFIX] Fixed null pointer on debug
This commit is contained in:
Jeroen Ketelaar authored and GitHub committed 2019-05-16 17:46:22 -05:00
commit aab8d78d1e
1 file changed
+1 -8
@@ -163,14 +163,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));
}
});