[vlc-devel] [PATCH] Qt: Simple prefs/input fix value handling

Jean-Baptiste Kempf jb at videolan.org
Thu Oct 1 17:21:52 CEST 2009


I believe this isn't the good solution, because of leaking.

On Thu, Oct 01, 2009 at 05:15:48PM +0200, Francois Cartegnie wrote :
> ---
>  modules/gui/qt4/components/simple_preferences.cpp |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/modules/gui/qt4/components/simple_preferences.cpp b/modules/gui/qt4/components/simple_preferences.cpp
> index c1ecda9..894c354 100644
> --- a/modules/gui/qt4/components/simple_preferences.cpp
> +++ b/modules/gui/qt4/components/simple_preferences.cpp
> @@ -719,8 +719,9 @@ void SPrefsPanel::apply()
>      case SPrefsInputAndCodecs:
>      {
>          /* Device default selection */
> -        const char *psz_devicepath =
> -              qtu( qobject_cast<QLineEdit *>(optionWidgets[inputLE] )->text() );
> +        const char *psz_devicepath = strdup(
> +              qtu( qobject_cast<QLineEdit *>(optionWidgets[inputLE] )->text() )
> +              );
>          if( !EMPTY_STR( psz_devicepath ) )
>          {
>              config_PutPsz( p_intf, "dvd", psz_devicepath );
> -- 
> 1.6.2.5
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel

-- 
Best Regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/



More information about the vlc-devel mailing list