From 4743545c82d0748e85660a33ee87c7a990aa24b0 Mon Sep 17 00:00:00 2001 From: AndyScherzinger Date: Mon, 25 Sep 2017 13:30:18 +0200 Subject: [PATCH] resolves #1590 by checking for null --- .../android/ui/fragment/OCFileListFragment.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java b/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java index 681e2dc75d..4c5174edbe 100644 --- a/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java +++ b/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java @@ -1538,12 +1538,16 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi } final FileDisplayActivity fileDisplayActivity = (FileDisplayActivity) getActivity(); - fileDisplayActivity.runOnUiThread(new Runnable() { - @Override - public void run() { - fileDisplayActivity.setIndeterminate(false); - } - }); + if (fileDisplayActivity != null) { + fileDisplayActivity.runOnUiThread(new Runnable() { + @Override + public void run() { + if (fileDisplayActivity != null) { + fileDisplayActivity.setIndeterminate(false); + } + } + }); + } } return remoteOperationResult.isSuccess();