Commit 5d24fbfb authored by Rémi Duraffort's avatar Rémi Duraffort

Qt4: fix a crash (kind of a 'use after free' error).

(cherry picked from commit 13c520d1c893ebc8420804d1c7b42c1e8fbab9b8)
Signed-off-by: default avatarRémi Duraffort <ivoire@videolan.org>
parent 71b24d18
...@@ -439,9 +439,9 @@ QMenu *QVLCMenu::ViewMenu( intf_thread_t *p_intf, QMenu *current, MainInterface ...@@ -439,9 +439,9 @@ QMenu *QVLCMenu::ViewMenu( intf_thread_t *p_intf, QMenu *current, MainInterface
foreach( QAction *a, actions ) foreach( QAction *a, actions )
{ {
QMenu *m = a->menu(); QMenu *m = a->menu();
if( m && m->parent() == menu ) delete m;
if( a->parent() == menu ) delete a; if( a->parent() == menu ) delete a;
else menu->removeAction( a ); else menu->removeAction( a );
if( m && m->parent() == menu ) delete m;
} }
} }
......
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