1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-23 08:18:52 -05:00

Fix NPE issues

This commit is contained in:
Reinhard Pointner 2017-02-04 22:41:01 +08:00
parent b0a8a0bc48
commit 97174d18bd

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);
}
});