aboutsummaryrefslogtreecommitdiff
path: root/src/net/cbaines/suma/BusStopActivity.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/cbaines/suma/BusStopActivity.java')
-rw-r--r--src/net/cbaines/suma/BusStopActivity.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/net/cbaines/suma/BusStopActivity.java b/src/net/cbaines/suma/BusStopActivity.java
index d84bbdd..b711770 100644
--- a/src/net/cbaines/suma/BusStopActivity.java
+++ b/src/net/cbaines/suma/BusStopActivity.java
@@ -237,7 +237,8 @@ public class BusStopActivity extends OrmLiteBaseActivity<DatabaseHelper> impleme
public void onPause() {
if (mHandler != null) { // BusTimes are enabled
mHandler.removeCallbacks(refreshData);
- timetableTask.cancel(true);
+ if (timetableTask != null) // Could happen if the handler has not created the timetableTask yet
+ timetableTask.cancel(true);
Log.i(TAG, "Stoping refreshing timetable data");
}