various small fixes

This commit is contained in:
honfika@gmail.com
2015-04-25 20:21:10 +02:00
parent 2900dd90e0
commit e700f91bf7
8 changed files with 59 additions and 28 deletions

View File

@@ -439,9 +439,11 @@ public class Main {
} catch (OutOfMemoryError ex) {
logger.log(Level.SEVERE, null, ex);
View.showMessageDialog(null, "Cannot load SWF file. Out of memory.");
continue;
} catch (Exception ex) {
logger.log(Level.SEVERE, null, ex);
View.showMessageDialog(null, "Cannot load SWF file.");
continue;
}
final SWFList swfs1 = swfs;
@@ -1106,7 +1108,10 @@ public class Main {
MainPanel mainPanel = mainFrame.getPanel();
TreePath tp = View.getTreePathByPathStrings(mainPanel.tagTree, Arrays.asList(path));
mainPanel.setTagTreeSelectedNode((TreeItem) tp.getLastPathComponent());
if (tp != null) {
// the current view is the Resources view, otherwise tp is null
mainPanel.setTagTreeSelectedNode((TreeItem) tp.getLastPathComponent());
}
}
});
}