Browse Source

Make not empty validator do a null check

Change-Id: Ic75627eee59724b171fe12ee92934e8b23fc79f7
Reviewed-on: http://gerrit.dmdirc.com/697
Automatic-Compile: Shane Mc Cormack <shane@dmdirc.com>
Reviewed-by: Shane Mc Cormack <shane@dmdirc.com>
tags/0.6.3b1
Gregory Holmes 14 years ago
parent
commit
a2f15926ce
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/com/dmdirc/config/prefs/validator/NotEmptyValidator.java

+ 1
- 1
src/com/dmdirc/config/prefs/validator/NotEmptyValidator.java View File

@@ -37,7 +37,7 @@ public class NotEmptyValidator implements Validator<String> {
37 37
     /** {@inheritDoc} */
38 38
     @Override
39 39
     public ValidationResponse validate(final String object) {
40
-        if (object.isEmpty()) {
40
+        if (object == null || object.isEmpty()) {
41 41
             return new ValidationResponse("Cannot be an empty string.");
42 42
         } else {
43 43
             return new ValidationResponse();

Loading…
Cancel
Save