Make file browse result check nullsafe
This commit is contained in:
parent
11a2dcb819
commit
428b44cc2b
1 changed files with 1 additions and 1 deletions
|
|
@ -933,7 +933,7 @@ namespace Observatory.UI.Views
|
||||||
var browseTask = openFileDialog.ShowAsync((Window)((Button)source).GetVisualRoot());
|
var browseTask = openFileDialog.ShowAsync((Window)((Button)source).GetVisualRoot());
|
||||||
browseTask.ContinueWith((task) =>
|
browseTask.ContinueWith((task) =>
|
||||||
{
|
{
|
||||||
if (task.Result.Count() > 0)
|
if (task.Result?.Count() > 0)
|
||||||
{
|
{
|
||||||
string path = browseTask.Result[0];
|
string path = browseTask.Result[0];
|
||||||
Avalonia.Threading.Dispatcher.UIThread.InvokeAsync(() => { settingPath.Text = path; });
|
Avalonia.Threading.Dispatcher.UIThread.InvokeAsync(() => { settingPath.Text = path; });
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue