Skip to content

Commit

Permalink
Fix crash if no currently selected instrument (#1656)
Browse files Browse the repository at this point in the history
  • Loading branch information
cme authored Sep 25, 2022
1 parent 4e5f9ea commit 64355a8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gui/src/SoundLibrary/SoundLibraryPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,9 @@ QString SoundLibraryPanel::getDrumkitPath( const QString& sDrumkitLabel ) const
void SoundLibraryPanel::change_background_color()
{
auto pSelectedInstrument = Hydrogen::get_instance()->getSelectedInstrument();
if ( pSelectedInstrument == nullptr ) {
return;
}
QString sDrumkitPath = pSelectedInstrument->get_drumkit_path();
QString sDrumkitLabel = getDrumkitLabel( sDrumkitPath );

Expand Down

0 comments on commit 64355a8

Please sign in to comment.