Fix (NSRL) label on first hash database

This commit is contained in:
Devin148 2012-11-07 15:16:50 -05:00
parent c46b8c7cf1
commit a05e29b84d

View File

@ -658,7 +658,11 @@ final class HashDbManagementPanel extends javax.swing.JPanel implements OptionsP
@Override @Override
public Object getValueAt(int rowIndex, int columnIndex) { public Object getValueAt(int rowIndex, int columnIndex) {
return rowIndex == 0 ? getDBAt(rowIndex).getName() + " (NSRL)" : getDBAt(rowIndex).getName(); if(xmlHandle.getNSRLSet() == null) {
return getDBAt(rowIndex).getName();
} else {
return rowIndex == 0 ? getDBAt(rowIndex).getName() + " (NSRL)" : getDBAt(rowIndex).getName();
}
} }
//Internal function for determining whether a companion -md5.idx file exists //Internal function for determining whether a companion -md5.idx file exists
@ -669,7 +673,7 @@ final class HashDbManagementPanel extends javax.swing.JPanel implements OptionsP
//Internal function for getting the DB at a certain index. Used as-is, as well as by dispatch from getValueAt() and indexExists() //Internal function for getting the DB at a certain index. Used as-is, as well as by dispatch from getValueAt() and indexExists()
private HashDb getDBAt(int rowIndex){ private HashDb getDBAt(int rowIndex){
if (xmlHandle.getNSRLSet() != null) { if (xmlHandle.getNSRLSet() != null) {
if(rowIndex == 0) { if(rowIndex == 0) {
return xmlHandle.getNSRLSet(); return xmlHandle.getNSRLSet();
} else { } else {