Replaced port area helper and avoided crash when searching at a harbour that has no entries

This commit is contained in:
Daniel Schick 2024-07-22 13:29:54 +02:00
parent 703986bbbc
commit ee6658bafd
2 changed files with 9 additions and 6 deletions

View File

@ -523,10 +523,12 @@ namespace ENI2.DetailViewControls
private void buttonSearchPortArea_Click(object sender, RoutedEventArgs e)
{
SelectPortAreaDialog spad = new SelectPortAreaDialog(this.Core.PoC);
if(spad.ShowDialog() ?? false)
if (portAreas != null)
{
if(spad.SelectedArea != null)
SelectPortAreaDialog spad = new SelectPortAreaDialog(this.Core.PoC);
if (spad.ShowDialog() ?? false)
{
if (spad.SelectedArea != null)
{
if (portAreas.ContainsKey(spad.SelectedArea))
{
@ -536,6 +538,7 @@ namespace ENI2.DetailViewControls
}
}
}
}
#endregion

Binary file not shown.