Commit e5462dbd authored by François Cartegnie's avatar François Cartegnie 🤞

Qt: PopupMenu: Stop crashing on VOut update. (fix #7016)

When calling a modal dialog, Qt switches to a new event loop.
The call may still have some event to process in its own queue,
and deleting it when doing the Vout update will have those events
refering to a no longer existing widget.
parent e75d2024
......@@ -769,7 +769,8 @@ QMenu *VLCMenuBar::HelpMenu( QWidget *parent )
*****************************************************************************/
#define POPUP_BOILERPLATE \
static QMenu* menu = NULL; \
delete menu; menu = NULL; \
if ( menu ) menu->deleteLater(); \ /* Ensure it is deleted after processing events */
menu = NULL; \ /* or we might crash on an incoming mouseup event */
if( !show ) \
return; \
QVector<vlc_object_t *> objects; \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment