Commit 13c520d1 authored by Rémi Duraffort's avatar Rémi Duraffort

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

parent c57caf76
...@@ -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