Merge pull request #1593 from nextcloud/NPE_OCFileListFragment

Prevent NPE in OCFileListFragment
This commit is contained in:
Andy Scherzinger 2017-09-25 16:55:03 +02:00 committed by GitHub
commit 1d6afe34e3

View file

@ -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();