Skip to content

Commit 2458ace

Browse files
authored
Fix: Fixed NullReferenceException in ShareItemsAsync (#14782)
1 parent 99ffa4a commit 2458ace

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Files.App/Helpers/ShareItemHelpers.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ public static bool IsItemShareable(ListedItem item)
2323

2424
public static async Task ShareItemsAsync(IEnumerable<ListedItem> itemsToShare)
2525
{
26+
if (itemsToShare is null)
27+
return;
28+
2629
var interop = DataTransferManager.As<IDataTransferManagerInterop>();
2730
IntPtr result = interop.GetForWindow(MainWindow.Instance.WindowHandle, InteropHelpers.DataTransferManagerInteropIID);
2831

0 commit comments

Comments
 (0)