From 742837f6546739929aa66fffe76dd946bec13098 Mon Sep 17 00:00:00 2001 From: "dkeen@dkeen-laptop" Date: Tue, 24 Apr 2012 16:13:23 -0700 Subject: [PATCH] Fixed NullPointerException --- AndroidManifest.xml | 4 ++-- src/com/dougkeen/bart/model/Departure.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 042419d..a4ae4f7 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:versionCode="15" + android:versionName="1.2.2" > diff --git a/src/com/dougkeen/bart/model/Departure.java b/src/com/dougkeen/bart/model/Departure.java index a1af043..9d03157 100644 --- a/src/com/dougkeen/bart/model/Departure.java +++ b/src/com/dougkeen/bart/model/Departure.java @@ -326,7 +326,7 @@ public class Departure implements Parcelable, Comparable { } private int getEqualsTolerance() { - if (origin.longStationLinger && hasDeparted()) { + if (origin != null && origin.longStationLinger && hasDeparted()) { return ESTIMATE_EQUALS_TOLERANCE_LONG_LINGER_MILLIS; } else { return ESTIMATE_EQUALS_TOLERANCE_MILLIS; @@ -337,7 +337,7 @@ public class Departure implements Parcelable, Comparable { StringBuilder builder = new StringBuilder(); int secondsLeft = getMeanSecondsLeft(); if (hasDeparted()) { - if (origin.longStationLinger && beganAsDeparted) { + if (origin != null && origin.longStationLinger && beganAsDeparted) { builder.append("At station"); } else { builder.append("Departed");