Fix NPE issues

This commit is contained in:
Reinhard Pointner 2017-02-04 22:41:01 +08:00
parent b0a8a0bc48
commit 97174d18bd
1 changed files with 2 additions and 2 deletions

View File

@ -121,7 +121,7 @@ public class SubtitleViewer extends JFrame {
@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
return super.getTableCellRendererComponent(table, timeFormat.format(value), isSelected, hasFocus, row, column);
return super.getTableCellRendererComponent(table, value == null ? null : timeFormat.format(value), isSelected, hasFocus, row, column);
}
});
@ -130,7 +130,7 @@ public class SubtitleViewer extends JFrame {
@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
return super.getTableCellRendererComponent(table, replaceSpace(value.toString(), " "), isSelected, hasFocus, row, column);
return super.getTableCellRendererComponent(table, value == null ? null : replaceSpace(value.toString(), " "), isSelected, hasFocus, row, column);
}
});