[vlc-commits] Qt: info panels: fix NULL dereference (#5368 fix).
Francois Cartegnie
git at videolan.org
Thu Sep 22 17:45:29 CEST 2011
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Sep 22 17:38:02 2011 +0200| [eda1f5fea35ddb79a196aea9bbd698c737e1bd0f] | committer: Francois Cartegnie
Qt: info panels: fix NULL dereference (#5368 fix).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=eda1f5fea35ddb79a196aea9bbd698c737e1bd0f
---
modules/gui/qt4/components/info_panels.cpp | 4 ++--
modules/gui/qt4/components/info_panels.hpp | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/gui/qt4/components/info_panels.cpp b/modules/gui/qt4/components/info_panels.cpp
index 7f2da22..3700585 100644
--- a/modules/gui/qt4/components/info_panels.cpp
+++ b/modules/gui/qt4/components/info_panels.cpp
@@ -236,9 +236,9 @@ void MetaPanel::update( input_item_t *p_item )
/* URL */
psz_meta = input_item_GetURL( p_item );
- if( !EMPTY_STR( psz_meta ) && strcmp( psz_meta, currentURL ) )
+ if( !EMPTY_STR( psz_meta ) && currentURL != psz_meta )
{
- free( currentURL ); currentURL = strdup( psz_meta );
+ currentURL = psz_meta;
lblURL->setText( "<a href='" + qfu( psz_meta ) + "'>" +
qfu( psz_meta ).remove( QRegExp( ".*://") ) + "</a>" );
diff --git a/modules/gui/qt4/components/info_panels.hpp b/modules/gui/qt4/components/info_panels.hpp
index 7784043..e82b024 100644
--- a/modules/gui/qt4/components/info_panels.hpp
+++ b/modules/gui/qt4/components/info_panels.hpp
@@ -86,7 +86,7 @@ private:
CoverArtLabel *art_cover;
QLabel *lblURL;
- char *currentURL;
+ QString currentURL;
public slots:
void update( input_item_t * );
More information about the vlc-commits
mailing list