fix: access violation

This commit is contained in:
Xiao YiFang 2022-10-03 10:35:47 +08:00
parent 7c30b89336
commit e8764d322c

View file

@ -1136,11 +1136,15 @@ void ScanPopup::altModePoll()
void ScanPopup::pageLoaded( ArticleView * ) void ScanPopup::pageLoaded( ArticleView * )
{ {
if( !isVisible() )
return;
definition->hasSound([this](bool has){ auto pronounceBtn = ui.pronounceButton;
ui.pronounceButton->setVisible( has ); definition->hasSound(
}); [ pronounceBtn ]( bool has )
{
if( pronounceBtn )
pronounceBtn->setVisible( has );
} );
updateBackForwardButtons(); updateBackForwardButtons();