Fix potential null references

dhcp-server
Pat Hartl 2023-09-11 01:37:37 -05:00
parent a9149db849
commit 15ad1d35a9
1 changed files with 3 additions and 3 deletions

View File

@ -79,10 +79,10 @@
<Tooltip Title="Delete" MouseEnterDelay="2"> <Tooltip Title="Delete" MouseEnterDelay="2">
<Popconfirm OnConfirm="Delete"> <Popconfirm OnConfirm="Delete">
<TitleTemplate> <TitleTemplate>
Are you sure you want to delete the selected file@(Selected.Count() == 1 ? "" : "s")? Are you sure you want to delete the selected file@(Selected?.Count() == 1 ? "" : "s")?
</TitleTemplate> </TitleTemplate>
<ChildContent> <ChildContent>
<Button Type="@ButtonType.Text" Icon="@IconType.Outline.Delete" Disabled="@(Selected.Count() == 0)" /> <Button Type="@ButtonType.Text" Icon="@IconType.Outline.Delete" Disabled="@(Selected?.Count() == 0)" />
</ChildContent> </ChildContent>
</Popconfirm> </Popconfirm>
</Tooltip> </Tooltip>
@ -166,7 +166,7 @@
FileManagerSource Source = FileManagerSource.FileSystem; FileManagerSource Source = FileManagerSource.FileSystem;
FileManagerDirectory Path { get; set; } FileManagerDirectory Path { get; set; } = new FileManagerDirectory();
List<FileManagerDirectory> Past { get; set; } = new List<FileManagerDirectory>(); List<FileManagerDirectory> Past { get; set; } = new List<FileManagerDirectory>();
List<FileManagerDirectory> Future { get; set; } = new List<FileManagerDirectory>(); List<FileManagerDirectory> Future { get; set; } = new List<FileManagerDirectory>();