Commit 3886a791 authored by Olivier Teulière's avatar Olivier Teulière

* skins2/src/skin_main.cpp: Fixed a crash in the preferences, reported by Trax

parent 62f073c8
...@@ -365,6 +365,9 @@ static int onSystrayChange( vlc_object_t *pObj, const char *pVariable, ...@@ -365,6 +365,9 @@ static int onSystrayChange( vlc_object_t *pObj, const char *pVariable,
return VLC_EGENERIC; return VLC_EGENERIC;
} }
// Check that we found the correct interface (same check as for the demux)
if( var_Type( pIntf, "skin-to-load" ) == VLC_VAR_STRING )
{
AsyncQueue *pQueue = AsyncQueue::instance( pIntf ); AsyncQueue *pQueue = AsyncQueue::instance( pIntf );
if( newVal.b_bool ) if( newVal.b_bool )
{ {
...@@ -376,6 +379,7 @@ static int onSystrayChange( vlc_object_t *pObj, const char *pVariable, ...@@ -376,6 +379,7 @@ static int onSystrayChange( vlc_object_t *pObj, const char *pVariable,
CmdRemoveFromTray *pCmd = new CmdRemoveFromTray( pIntf ); CmdRemoveFromTray *pCmd = new CmdRemoveFromTray( pIntf );
pQueue->push( CmdGenericPtr( pCmd ) ); pQueue->push( CmdGenericPtr( pCmd ) );
} }
}
vlc_object_release( pIntf ); vlc_object_release( pIntf );
return VLC_SUCCESS; return VLC_SUCCESS;
...@@ -395,6 +399,9 @@ static int onTaskBarChange( vlc_object_t *pObj, const char *pVariable, ...@@ -395,6 +399,9 @@ static int onTaskBarChange( vlc_object_t *pObj, const char *pVariable,
return VLC_EGENERIC; return VLC_EGENERIC;
} }
// Check that we found the correct interface (same check as for the demux)
if( var_Type( pIntf, "skin-to-load" ) == VLC_VAR_STRING )
{
AsyncQueue *pQueue = AsyncQueue::instance( pIntf ); AsyncQueue *pQueue = AsyncQueue::instance( pIntf );
if( newVal.b_bool ) if( newVal.b_bool )
{ {
...@@ -406,6 +413,7 @@ static int onTaskBarChange( vlc_object_t *pObj, const char *pVariable, ...@@ -406,6 +413,7 @@ static int onTaskBarChange( vlc_object_t *pObj, const char *pVariable,
CmdRemoveFromTaskBar *pCmd = new CmdRemoveFromTaskBar( pIntf ); CmdRemoveFromTaskBar *pCmd = new CmdRemoveFromTaskBar( pIntf );
pQueue->push( CmdGenericPtr( pCmd ) ); pQueue->push( CmdGenericPtr( pCmd ) );
} }
}
vlc_object_release( pIntf ); vlc_object_release( pIntf );
return VLC_SUCCESS; return VLC_SUCCESS;
......
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