mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 23:28:42 +03:00
Avoid null pointer exception when the details fragment is empty
This commit is contained in:
parent
cbf9ca8bea
commit
271a4ba1df
1 changed files with 3 additions and 1 deletions
|
@ -463,7 +463,9 @@ public class FileDetailFragment extends SherlockFragment implements
|
|||
private class DownloadFinishReceiver extends BroadcastReceiver {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue