From 9d2f6b29f7773f8e01c849b03dbd58119e7e633f Mon Sep 17 00:00:00 2001 From: "Alexander \"PapaTutuWawa" Date: Sat, 29 Jul 2023 22:34:37 +0200 Subject: [PATCH] fix(service): Null-pointer dereference --- lib/service/xmpp.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/service/xmpp.dart b/lib/service/xmpp.dart index de2ca34c..b4db88ce 100644 --- a/lib/service/xmpp.dart +++ b/lib/service/xmpp.dart @@ -1388,7 +1388,7 @@ class XmppService { // - there is a file attached and // - we have not retrieved the file metadata OR we know of the file but have no path for it if (shouldDownload && (!(fileMetadata?.retrieved ?? false)) || - fileMetadata?.fileMetadata.path == null) { + fileMetadata?.fileMetadata.path == null && embeddedFile != null) { final fts = GetIt.I.get(); final metadata = await peekFile(embeddedFile!.urls.first);