Commit 3a409569 authored by Olivier Teulière's avatar Olivier Teulière

* skins2/vars/equalizer.cpp: Fixed an invalid memory read, potential crasher

 * skins2/src/generic_layout.cpp: Fixed an old memory leak
This is a forwardport of [18282]
parent 402d93f7
......@@ -27,6 +27,7 @@
#include "os_factory.hpp"
#include "os_graphics.hpp"
#include "var_manager.hpp"
#include "anchor.hpp"
#include "../controls/ctrl_generic.hpp"
#include "../controls/ctrl_video.hpp"
#include "../utils/var_bool.hpp"
......@@ -57,6 +58,11 @@ GenericLayout::~GenericLayout()
{
delete m_pImage;
}
list<Anchor*>::const_iterator it;
for( it = m_anchorList.begin(); it != m_anchorList.end(); it++ )
{
delete *it;
}
}
......
......@@ -94,14 +94,15 @@ void EqualizerBands::onUpdate( Subject<VarPercent> &rBand, void *arg )
ss << " " << val;
}
string bands = ss.str();
aout_instance_t *pAout = (aout_instance_t *)vlc_object_find( getIntf(),
VLC_OBJECT_AOUT, FIND_ANYWHERE );
char *bands = (char*)ss.str().c_str();
config_PutPsz( getIntf(), "equalizer-bands", bands );
config_PutPsz( getIntf(), "equalizer-bands", bands.c_str() );
if( pAout )
{
// Update the audio output
var_SetString( pAout, "equalizer-bands", bands );
var_SetString( pAout, "equalizer-bands", (char*)bands.c_str() );
vlc_object_release( pAout );
}
}
......
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