diff --git a/lib/views/filesharingview.dart b/lib/views/filesharingview.dart index 9c517ad7..62fda176 100644 --- a/lib/views/filesharingview.dart +++ b/lib/views/filesharingview.dart @@ -37,7 +37,7 @@ class _FileSharingViewState extends State { future: Provider.of(context, listen: false).cwtch.GetSharedFiles(profileHandle, Provider.of(context).identifier), builder: (context, snapshot) { if (snapshot.hasData) { - List sharedFiles = jsonDecode(snapshot.data as String); + List sharedFiles = jsonDecode(snapshot.data as String) ?? List.empty(); sharedFiles.sort((a, b) { return a["DateShared"].toString().compareTo(b["DateShared"].toString()); });