Fixes NPE if a default string is missing.

cusax-fix
Damian Minkov 14 years ago
parent 3186bca42c
commit e3ff8a5b36

@ -78,6 +78,10 @@ private static class CipherTableModel extends AbstractTableModel
public void loadData(String ciphers)
{
data.clear();
if(defaultCiphers == null)
return;
if(ciphers == null)
ciphers = defaultCiphers;
//TODO the available ciphers should come from SDesControlImpl
@ -157,7 +161,8 @@ String getEnabledCiphers()
if(sb.length() == 0)
return null;
String result = sb.substring(0, sb.length()-1);
return defaultCiphers.equals(result) ? null : result;
return (defaultCiphers == null
|| defaultCiphers.equals(result)) ? null : result;
}
}

Loading…
Cancel
Save