fix potential crash with reminders

This commit is contained in:
Phillip Thelen 2016-08-01 15:20:38 +02:00
parent 8a467b04c4
commit 2ddc426d6b

View file

@ -19,7 +19,9 @@ public class RemindersItemSerializer
public JsonElement serialize(RemindersItem src, Type typeOfSrc, JsonSerializationContext context) {
JsonObject object = new JsonObject();
object.addProperty("id", src.getId());
object.addProperty("startDate", src.getStartDate().getTime());
if (src.getStartDate() != null) {
object.addProperty("startDate", src.getStartDate().getTime());
}
object.addProperty("time", src.getTime().getTime());
return object;
}