Kaydet (Commit) b3e0bd62 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1326399 Dereference null return value

Change-Id: I7828cdfcda5d4065fc3dafee744757292753abb5
üst 1a84fb8f
......@@ -71,7 +71,9 @@ public class PlainSourceView extends JScrollPane implements
try {
int line = ta.getLineStartOffset(model.getCurrentPosition());
Rectangle rect = ta.modelToView(line);
ta.scrollRectToVisible(rect);
if (rect != null) {
ta.scrollRectToVisible(rect);
}
} catch (BadLocationException e) {
// couldn't scroll to line, do nothing
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment