From cf97bb939354ae5704f7d8f349cfa159fac36da8 Mon Sep 17 00:00:00 2001 From: Sam Bosley Date: Thu, 7 Mar 2013 13:55:58 -0800 Subject: [PATCH] Fixed a potential concurrency bug --- .../com/todoroo/astrid/actfm/sync/ActFmSyncThread.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncThread.java b/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncThread.java index 9e276e17a..46049b40a 100644 --- a/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncThread.java +++ b/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncThread.java @@ -240,8 +240,10 @@ public class ActFmSyncThread { }; private void incrementProgress() { - if (activity != null) { - activity.runOnUiThread(incrementProgressRunnable); + synchronized (progressBarLock) { + if (activity != null) { + activity.runOnUiThread(incrementProgressRunnable); + } } }