Commit db44bc22 authored by Jean-Philippe Andre's avatar Jean-Philippe Andre

Incref/decref input_item to avoid eventual segfaults

parent 69487bf4
...@@ -390,7 +390,9 @@ private: ...@@ -390,7 +390,9 @@ private:
public slots: public slots:
void requestUpdate() { emit updateRequested(); }; void requestUpdate() { emit updateRequested(); };
void update( input_item_t* p_item ) void update( input_item_t* p_item )
{ p_input = p_item; requestUpdate(); } { if( p_input ) vlc_gc_decref( p_input );
if( ( p_input = p_item ) ) vlc_gc_incref( p_input );
requestUpdate(); }
private slots: private slots:
void doUpdate(); void doUpdate();
......
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