From 7a7d4e326f7698bd5930e70cf01d3d6d1fcd3fcb Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Tue, 7 Feb 2012 21:41:25 +0000 Subject: Fixed a problem, that relates to a bug report on the Android Market. --- src/net/cbaines/suma/BusStopActivity.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 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"); } -- cgit v1.2.3