fix startup crashes

This commit is contained in:
Ben Fry
2015-01-27 10:20:17 -05:00
parent 2681bad78d
commit d78455b967
2 changed files with 10 additions and 6 deletions

View File

@@ -100,9 +100,11 @@ public class DebugTray extends JFrame {
this.editor = editor;
editor.addComponentListener(new EditorFollower());
setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
add(createToolbar());
add(createScrollPane());
//setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
Box box = Box.createVerticalBox();
box.add(createToolbar());
box.add(createScrollPane());
getContentPane().add(box);
pack();
/*

View File

@@ -2174,9 +2174,11 @@ public class JavaEditor extends Editor {
ta.clearGutterText();
// load appropriate line backgrounds for tab
// first paint breakpoints
for (LineHighlight hl : breakpointedLines) {
if (isInCurrentTab(hl.getLineID())) {
hl.paint();
if (breakpointedLines != null) {
for (LineHighlight hl : breakpointedLines) {
if (isInCurrentTab(hl.getLineID())) {
hl.paint();
}
}
}
// now paint current line (if any)