Fixing various NRE
This commit is contained in:
@@ -219,8 +219,8 @@ public class HallRequestHandler extends LotroServerRequestHandler implements Uri
|
||||
private boolean IgnoreError(Exception ex) {
|
||||
String msg = ex.getMessage();
|
||||
|
||||
if(msg != null && msg.contains("You don't have a deck registered yet") ||
|
||||
msg.contains("Your selected deck is not valid for this format"))
|
||||
if(msg != null && (msg.contains("You don't have a deck registered yet") ||
|
||||
msg.contains("Your selected deck is not valid for this format")))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
@@ -860,18 +860,28 @@ var CardFilter = Class.extend({
|
||||
sort = " sort:" + sort;
|
||||
|
||||
var format = this.currentFormat;
|
||||
if (format)
|
||||
if (format) {
|
||||
format = " format:" + format;
|
||||
else
|
||||
}
|
||||
else {
|
||||
format = "";
|
||||
}
|
||||
|
||||
var block = $("#blockSelect option:selected").prop("value");
|
||||
if (block)
|
||||
if (block) {
|
||||
block = " block:" + block;
|
||||
}
|
||||
else {
|
||||
block = "":
|
||||
}
|
||||
|
||||
var set = $("#setSelect option:selected").prop("value");
|
||||
if (set)
|
||||
if (set) {
|
||||
set = " set:" + set;
|
||||
}
|
||||
else {
|
||||
set = "";
|
||||
}
|
||||
|
||||
var cardType = $("#cardTypeSelect option:selected").prop("value");
|
||||
if (cardType != "")
|
||||
|
||||
@@ -74,7 +74,12 @@ public class SortAndFilterCards {
|
||||
//Cache our looked-up blueprints so we're not always re-searching; also used later for sorting
|
||||
try {
|
||||
if(!cardBPCache.containsKey(blueprintId)) {
|
||||
cardBPCache.putIfAbsent(blueprintId, cardLibrary.getLotroCardBlueprint(blueprintId));
|
||||
var bp = cardLibrary.getLotroCardBlueprint(blueprintId);
|
||||
//TODO: log this
|
||||
if(bp == null)
|
||||
continue;
|
||||
|
||||
cardBPCache.putIfAbsent(blueprintId, bp);
|
||||
}
|
||||
} catch (CardNotFoundException ignored) {
|
||||
// Ignore the card
|
||||
|
||||
Reference in New Issue
Block a user