diff --git a/src/cmd/flag.d b/src/cmd/flag.d index a5d277d..52c8de8 100644 --- a/src/cmd/flag.d +++ b/src/cmd/flag.d @@ -100,6 +100,8 @@ public class Flag { * query = String to check. */ public bool matches(string query) const nothrow @safe { + if (query == null) + return false; return (query.startsWith("--") && longName == query[2..$]) || (query.startsWith("-") && shortName == query[1..2])