Skip to content

Commit

Permalink
Possible fix to NPE in RequirementChecker.
Browse files Browse the repository at this point in the history
  • Loading branch information
aufdemrand committed Aug 7, 2013
1 parent 048fff3 commit 56eee4f
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -49,7 +49,8 @@ public boolean check(RequirementsContext context) {

// Counters for keeping track of checked and met requirements
int numberChecked = 0;
int[] numberMet = new int[context.mode.modeInt.length];
int[] numberMet = context.mode.modeInt != null ?
new int[context.mode.modeInt.length] : new int[] { 1 };

This comment has been minimized.

Copy link
@spaceemotion

spaceemotion Aug 8, 2013

Contributor

I think this needs to be new int[] { 0 }


// Check all requirements
for (String reqEntry : context.list) {
Expand Down

0 comments on commit 56eee4f

Please sign in to comment.