Skip to content

Commit

Permalink
Fixed NPE on iOS date picker when date set to null. https://groups.go…
Browse files Browse the repository at this point in the history
  • Loading branch information
shannah committed May 25, 2017
1 parent 60da1ba commit e193168
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -7620,8 +7620,10 @@ public Object showNativePicker(final int type, final Component source, final Obj
c.set(java.util.Calendar.HOUR_OF_DAY, ((Integer)currentValue).intValue() / 60);
c.set(java.util.Calendar.MINUTE, ((Integer)currentValue).intValue() % 60);
time = c.getTime().getTime();
} else {
} else if (currentValue != null) {
time = ((java.util.Date)currentValue).getTime();
} else {
time = new java.util.Date().getTime();
}
nativeInstance.openDatePicker(type, time, x, y, w, h, preferredWidth, preferredHeight);
}
Expand Down

0 comments on commit e193168

Please sign in to comment.