[vlc-devel] commit: Incref/decref input_item to avoid eventual segfaults ( Jean-Philippe Andre )
git version control
git at videolan.org
Fri Sep 12 07:23:25 CEST 2008
vlc | branch: master | Jean-Philippe Andre <jpeg at via.ecp.fr> | Thu Sep 11 22:06:09 2008 -0400| [db44bc2201d007bb1c1599ef79ba51b2ef1d24c2] | committer: Jean-Philippe Andre
Incref/decref input_item to avoid eventual segfaults
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=db44bc2201d007bb1c1599ef79ba51b2ef1d24c2
---
modules/gui/qt4/components/interface_widgets.hpp | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/modules/gui/qt4/components/interface_widgets.hpp b/modules/gui/qt4/components/interface_widgets.hpp
index 535ca32..f6dd924 100644
--- a/modules/gui/qt4/components/interface_widgets.hpp
+++ b/modules/gui/qt4/components/interface_widgets.hpp
@@ -390,7 +390,9 @@ private:
public slots:
void requestUpdate() { emit updateRequested(); };
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:
void doUpdate();
More information about the vlc-devel
mailing list