From 4adeeea742d59a6e92cbf7668607dec45cc60060 Mon Sep 17 00:00:00 2001 From: TerriblePanda Date: Sat, 14 Sep 2019 00:38:14 +0800 Subject: [PATCH] fix some renamers are crashing me --- src/main/java/me/grax/jbytemod/ui/ClassTree.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/java/me/grax/jbytemod/ui/ClassTree.java b/src/main/java/me/grax/jbytemod/ui/ClassTree.java index e1f6c4f..71239a1 100644 --- a/src/main/java/me/grax/jbytemod/ui/ClassTree.java +++ b/src/main/java/me/grax/jbytemod/ui/ClassTree.java @@ -80,10 +80,14 @@ public void refreshTree(JarArchive jar) { if (preloadMap.containsKey(p)) { prev = preloadMap.get(p); } else { - SortedTreeNode stn = new SortedTreeNode(path[i]); - prev.add(stn); - prev = stn; - preloadMap.put(p, prev); + try{ + SortedTreeNode stn = new SortedTreeNode(path[i]); + prev.add(stn); + prev = stn; + preloadMap.put(p, prev); + }catch(ArrayIndexOutOfBoundsException ex){ + JByteMod.LOGGER.println("Failed to load " + path[i]); + } } i++; }