From e5e48a73998db6b4546e41e80f558cb4792176ab Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Tue, 19 Feb 2013 21:16:21 -0800 Subject: Fix "java.lang.IllegalArgumentException: View not attached to window manager" --- .../github/daneren2005/dsub/util/ModalBackgroundTask.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/subsonic-android/src/github/daneren2005/dsub/util/ModalBackgroundTask.java b/subsonic-android/src/github/daneren2005/dsub/util/ModalBackgroundTask.java index 973f4ead..1954c474 100644 --- a/subsonic-android/src/github/daneren2005/dsub/util/ModalBackgroundTask.java +++ b/subsonic-android/src/github/daneren2005/dsub/util/ModalBackgroundTask.java @@ -129,11 +129,13 @@ public abstract class ModalBackgroundTask extends BackgroundTask { @Override public void updateProgress(final String message) { - getHandler().post(new Runnable() { - @Override - public void run() { - progressDialog.setMessage(message); - } - }); + if(!cancelled) { + getHandler().post(new Runnable() { + @Override + public void run() { + progressDialog.setMessage(message); + } + }); + } } } -- cgit v1.2.3