Skip to content

Commit

Permalink
fixed a empty book crash
Browse files Browse the repository at this point in the history
  • Loading branch information
popcorn9499 committed Aug 14, 2020
1 parent 1c4f981 commit 6f209e1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ProcessAudiobooks-UI/MainWindow.xaml.cs
Expand Up @@ -96,6 +96,8 @@ private void btnEditBook_Click(object sender, RoutedEventArgs e)
{
DataObjects.Audiobook audiobook = (DataObjects.Audiobook)eLvAudiobook.SelectedItem; ;
AddAudiobookWindow audiobookWindow;
if (audiobook == null) //fixes crash if we try to edit without selecting something
return;
do
{
audiobookWindow = new AddAudiobookWindow(audiobook);
Expand Down

0 comments on commit 6f209e1

Please sign in to comment.