playlist_add_t *p_add = (playlist_add_t *)malloc( sizeof( playlist_add_t));
memcpy( p_add, nval.p_address, sizeof( playlist_add_t ) );
- PLEvent *event = new PLEvent( p_add );
+ PLEvent *event = new PLEvent( p_add );
QApplication::postEvent( p_model, static_cast<QEvent*>(event) );
return VLC_SUCCESS;
}
PLEvent( int type, int id ) : QEvent( (QEvent::Type)(type) )
{ i_id = id; p_add = NULL; };
- PLEvent( playlist_add_t *a ) : QEvent( (QEvent::Type)(ItemAppend_Type) )
+ PLEvent( playlist_add_t *a ) : QEvent( (QEvent::Type)(ItemAppend_Type) )
{ p_add = a; };
- virtual ~PLEvent() {};
+ virtual ~PLEvent() { free( p_add ); };
int i_id;
playlist_add_t *p_add;