Fixed NullPointerException
This commit is contained in:
parent
ec71764aad
commit
742837f654
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.dougkeen.bart"
|
||||
android:versionCode="14"
|
||||
android:versionName="1.2.1" >
|
||||
android:versionCode="15"
|
||||
android:versionName="1.2.2" >
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
|
@ -326,7 +326,7 @@ public class Departure implements Parcelable, Comparable<Departure> {
|
||||
}
|
||||
|
||||
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<Departure> {
|
||||
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");
|
||||
|
Loading…
Reference in New Issue
Block a user