mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 15:15:51 +03:00
prevent NPE
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
parent
d1611f6334
commit
b31cee531b
1 changed files with 8 additions and 4 deletions
|
@ -45,14 +45,18 @@ public class LoadUrlTask extends AsyncTask<String, Void, String> {
|
|||
|
||||
@Override
|
||||
protected String doInBackground(String... fileId) {
|
||||
if (editorWebViewWeakReference.get() == null) {
|
||||
final EditorWebView editorWebView = editorWebViewWeakReference.get();
|
||||
|
||||
if (editorWebView == null) {
|
||||
return "";
|
||||
}
|
||||
|
||||
RemoteOperationResult result = null;
|
||||
if (editorWebViewWeakReference.get() instanceof RichDocumentsEditorWebView) {
|
||||
RemoteOperationResult result;
|
||||
|
||||
|
||||
if (editorWebView instanceof RichDocumentsEditorWebView) {
|
||||
result = new RichDocumentsUrlOperation(fileId[0]).execute(account, editorWebViewWeakReference.get());
|
||||
} else if (editorWebViewWeakReference.get() instanceof TextEditorWebView) {
|
||||
} else if (editorWebView instanceof TextEditorWebView) {
|
||||
result = new DirectEditingOpenFileRemoteOperation(fileId[0], TEXT)
|
||||
.execute(account, editorWebViewWeakReference.get());
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue