mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 17:46:37 +03:00
fix npe if data is null
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
parent
8dce69087f
commit
5ebfa13be5
1 changed files with 7 additions and 1 deletions
|
@ -2075,7 +2075,13 @@ public class FileDisplayActivity extends HookActivity
|
|||
updateFileFromDB();
|
||||
refreshListOfFilesFragment(false);
|
||||
} else if (fileDetailFragment.getView() != null) {
|
||||
String errorResponse = result.getData().size() > 0 ? result.getData().get(0).toString() : "";
|
||||
String errorResponse;
|
||||
|
||||
if (result.getData() != null && result.getData().size() > 0) {
|
||||
errorResponse = result.getData().get(0).toString();
|
||||
} else {
|
||||
errorResponse = "";
|
||||
}
|
||||
|
||||
if (!TextUtils.isEmpty(errorResponse)) {
|
||||
snackbar = Snackbar.make(fileDetailFragment.getView(), errorResponse, Snackbar.LENGTH_LONG);
|
||||
|
|
Loading…
Reference in a new issue