Skip to content

Commit

Permalink
prevent exception
Browse files Browse the repository at this point in the history
happens when user tries to load the style but no basemap style has been selected
  • Loading branch information
williambohrmann3 committed Jul 25, 2024
1 parent 58359a0 commit bf631fe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ private void BasemapStyleGallery_SelectionChanged(object sender, SelectionChange

private void LoadButton_Click(object sender, RoutedEventArgs e)
{
// Return if no basemap style is selected.
if (BasemapStyleGallery.SelectedItem == null) return;

// Create a new basemap style parameters object.
var basemapStyleParameters = new BasemapStyleParameters();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ private void BasemapStyleGallery_SelectionChanged(object sender, SelectionChange

private void LoadButton_Click(object sender, RoutedEventArgs e)
{
// Return if no basemap style is selected.
if (BasemapStyleGallery.SelectedItem == null) return;

// Create a new basemap style parameters object.
var basemapStyleParameters = new BasemapStyleParameters();

Expand Down

0 comments on commit bf631fe

Please sign in to comment.