Bug fix for Qt GUI crashing when trying to display a snapshot of an empty bookmark slot.

This commit is contained in:
mjbudd77 2021-11-26 08:39:53 -05:00
parent b116c219ec
commit 82bd4b55a7
2 changed files with 3 additions and 1 deletions

View File

@ -4655,6 +4655,8 @@ bookmarkPreviewPopup::bookmarkPreviewPopup( int index, QWidget *parent )
uint32_t pixel; uint32_t pixel;
QPixmap pixmap; QPixmap pixmap;
setHideOnMouseMove(true);
fceuWrapperLock(); fceuWrapperLock();
// retrieve info from the pointed bookmark's Markers // retrieve info from the pointed bookmark's Markers

View File

@ -974,7 +974,7 @@ bool BOOKMARKS::event(QEvent *event)
item = (row_under_mouse + 1) % TOTAL_BOOKMARKS; item = (row_under_mouse + 1) % TOTAL_BOOKMARKS;
item_valid = (item >= 0) && (item < TOTAL_BOOKMARKS); item_valid = (item >= 0) && (item < TOTAL_BOOKMARKS);
if ( item_valid ) if ( item_valid && bookmarks->bookmarksArray[item].notEmpty)
{ {
static_cast<bookmarkPreviewPopup*>(fceuCustomToolTipShow( helpEvent, new bookmarkPreviewPopup(item, this) )); static_cast<bookmarkPreviewPopup*>(fceuCustomToolTipShow( helpEvent, new bookmarkPreviewPopup(item, this) ));
//QToolTip::showText(helpEvent->globalPos(), tr(stmp), this ); //QToolTip::showText(helpEvent->globalPos(), tr(stmp), this );