X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/146f7969b3be30754aca10395fa39f68928a392e..233553a081997ec256715552aac691c6563cbe45:/src/eu/alefzero/owncloud/ui/fragment/FileDetailFragment.java diff --git a/src/eu/alefzero/owncloud/ui/fragment/FileDetailFragment.java b/src/eu/alefzero/owncloud/ui/fragment/FileDetailFragment.java index 8abf5696..8dcdb9cc 100644 --- a/src/eu/alefzero/owncloud/ui/fragment/FileDetailFragment.java +++ b/src/eu/alefzero/owncloud/ui/fragment/FileDetailFragment.java @@ -463,7 +463,9 @@ public class FileDetailFragment extends SherlockFragment implements private class DownloadFinishReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { - getView().findViewById(R.id.fdDownloadBtn).setEnabled(true); + if (getView()!=null && getView().findViewById(R.id.fdDownloadBtn) != null) + getView().findViewById(R.id.fdDownloadBtn).setEnabled(true); + if (intent.getAction().equals(FileDownloader.BAD_DOWNLOAD_MESSAGE)) { Toast.makeText(context, R.string.downloader_download_failed , Toast.LENGTH_SHORT).show();