[vlc-devel] [PATCH] Fixes crash after customizing the interface via popup menu.

VlcVelope 1034-135 at online.de
Mon Apr 30 00:12:07 CEST 2012


On 29.04.2012 23:35, Jean-Baptiste Kempf wrote:
> On Sun, Apr 29, 2012 at 10:54:41PM +0200, VlcVelope wrote :
>> diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
>> index 9c277fb..c99fa12 100755
>> --- a/modules/gui/qt4/main_interface.cpp
>> +++ b/modules/gui/qt4/main_interface.cpp
>> @@ -352,6 +352,7 @@ void MainInterface::recreateToolbars()
>>                    this, handleKeyPress( QKeyEvent * ) );
>>           THEMIM->requestVoutUpdate();
>>       }
>> +    setMinimalView( b_minimalView );
>>   }
>
> How is that related to the next part?
THEMIM->requestVoutUpdate() emits the signal 'voutListChanged' via 
InputManager::UpdateVout(). That in turn is used by the FSC to connect 
its play button to the state of the vout, which is fine. But it also 
triggers MainInterface::destroyPopupMenu() which then executes this 
#define. Still OK. But if you happen to customize the interface via 
VLCMenuBar::PopupMenu(), the following 'delete menu' line causes a 
crash. This does NOT happen, if the interface customize dialog is 
invoked via the menubar.
The delete being executed by the idle loop however does remove the 
problem on my ubuntu and on my windows machine.
>
>> -    delete menu; menu = NULL; \
>> +    if( menu ) \
>> +        emit menu->deleteLater(); \
>> +    menu = NULL; \
>
>    Why?
>
> Best regards,
>



More information about the vlc-devel mailing list