mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
prevent NPE
This commit is contained in:
@@ -806,7 +806,12 @@ public class FDeckEditor extends TabPageScreen<FDeckEditor> {
|
|||||||
}
|
}
|
||||||
else if (parentScreen.getEditorType() == EditorType.Quest||parentScreen.getEditorType() == EditorType.QuestCommander) {
|
else if (parentScreen.getEditorType() == EditorType.Quest||parentScreen.getEditorType() == EditorType.QuestCommander) {
|
||||||
//prevent adding more than is in quest inventory
|
//prevent adding more than is in quest inventory
|
||||||
qty = parentScreen.getCatalogPage().cardManager.getItemCount(card);
|
try {
|
||||||
|
qty = parentScreen.getCatalogPage().cardManager.getItemCount(card);
|
||||||
|
} catch (Exception e) {
|
||||||
|
//prevent NPE
|
||||||
|
qty = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//if not source of items being added, use max directly if unlimited pool
|
//if not source of items being added, use max directly if unlimited pool
|
||||||
|
|||||||
Reference in New Issue
Block a user