Fixed exception when identifier is null. Also handling null names as this may be a future scenario.

This commit is contained in:
CalDescent 2022-02-26 14:04:35 +00:00
parent c65a63fc7e
commit badb576991

View File

@ -338,9 +338,12 @@ public class ArbitraryDataStorageManager extends Thread {
// Loop through cached hostedTransactions
for (ArbitraryTransactionData atd : this.hostedTransactions) {
try {
if(atd.getName().toLowerCase().contains(this.searchQuery) || atd.getIdentifier().toLowerCase().contains(this.searchQuery))
if (atd.getName() != null && atd.getName().toLowerCase().contains(this.searchQuery)) {
searchResultsList.add(atd);
}
else if (atd.getIdentifier() != null && atd.getIdentifier().toLowerCase().contains(this.searchQuery)) {
searchResultsList.add(atd);
}
} catch (Exception e) {
continue;