make #5144 actually work

This commit is contained in:
Ben Fry
2018-03-26 19:17:48 -04:00
parent 870face37c
commit 1b51692025
+4 -5
View File
@@ -5922,12 +5922,11 @@ public class PApplet implements PConstants {
*/
public XML loadXML(String filename, String options) {
try {
BufferedReader br = createReader(filename);
if (br != null) {
return new XML(br, options);
} else {
br = null;
BufferedReader reader = createReader(filename);
if (reader != null) {
return new XML(reader, options);
}
return null;
// can't use catch-all exception, since it might catch the
// RuntimeException about the incorrect case sensitivity