diff --git a/scanpopup.cc b/scanpopup.cc index dacce48e..26197c54 100644 --- a/scanpopup.cc +++ b/scanpopup.cc @@ -1136,11 +1136,15 @@ void ScanPopup::altModePoll() void ScanPopup::pageLoaded( ArticleView * ) { - - - definition->hasSound([this](bool has){ - ui.pronounceButton->setVisible( has ); - }); + if( !isVisible() ) + return; + auto pronounceBtn = ui.pronounceButton; + definition->hasSound( + [ pronounceBtn ]( bool has ) + { + if( pronounceBtn ) + pronounceBtn->setVisible( has ); + } ); updateBackForwardButtons();