mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
Added check for null string to fix crash (Issue# 312)
This commit is contained in:
@@ -91,6 +91,7 @@ public interface Constant {
|
|||||||
Stack;
|
Stack;
|
||||||
|
|
||||||
public static Zone smartValueOf(final String value) {
|
public static Zone smartValueOf(final String value) {
|
||||||
|
if (value == null) { return null; }
|
||||||
if ("All".equals(value)) { return null; }
|
if ("All".equals(value)) { return null; }
|
||||||
String valToCompate = value.trim();
|
String valToCompate = value.trim();
|
||||||
for (Zone v : Zone.values()) { if (v.name().compareToIgnoreCase(valToCompate) == 0) { return v; } }
|
for (Zone v : Zone.values()) { if (v.name().compareToIgnoreCase(valToCompate) == 0) { return v; } }
|
||||||
|
|||||||
Reference in New Issue
Block a user