mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-31 14:15:14 +00:00
Do not send null NetworkPackets
Summary: queuedSendUriList can return null and subsequently an attempt is make to actually send this null packet Reviewers: #kde_connect, nicolasfella Reviewed By: #kde_connect, nicolasfella Subscribers: nicolasfella, kdeconnect Tags: #kde_connect Differential Revision: https://phabricator.kde.org/D17384
This commit is contained in:
@@ -284,7 +284,11 @@ public class SharePlugin extends Plugin implements ReceiveFileRunnable.CallBack
|
||||
//Read all the data early, as we only have permissions to do it while the activity is alive
|
||||
final ArrayList<NetworkPacket> toSend = new ArrayList<>();
|
||||
for (Uri uri : uriList) {
|
||||
toSend.add(uriToNetworkPacket(context, uri));
|
||||
NetworkPacket np = uriToNetworkPacket(context, uri);
|
||||
|
||||
if (np != null) {
|
||||
toSend.add(np);
|
||||
}
|
||||
}
|
||||
|
||||
//Callback that shows a progress notification
|
||||
|
Reference in New Issue
Block a user