Browse Source

NPE check when parsing colors

Guy Carmeli 8 years ago
parent
commit
b9ffdb9b7c

+ 1
- 1
android/app/src/main/java/com/reactnativenavigation/params/parsers/StyleParamsParser.java View File

122
         if (color.hasColor()) {
122
         if (color.hasColor()) {
123
             return color;
123
             return color;
124
         } else {
124
         } else {
125
-            return defaultColor.hasColor() ? defaultColor : color;
125
+            return defaultColor != null && defaultColor.hasColor() ? defaultColor : color;
126
         }
126
         }
127
     }
127
     }
128
 }
128
 }