diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index 4ca70ed28..f6300f9bf 100644 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -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