From 9cbf602bfcb939b52332cb3c854bf7b1ddede517 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Tue, 22 Jan 2008 19:30:31 +0000 Subject: [PATCH] - Don't mix delete and free(). - Don't free/delete stuff that belongs to LibVLC - closes #1397 for real. And this has nothing to do with [24331] or [24406]. --- modules/gui/qt4/qt4.cpp | 3 +-- modules/gui/qt4/qt4.hpp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp index 7e19bb2de6..ecd9005106 100644 --- a/modules/gui/qt4/qt4.cpp +++ b/modules/gui/qt4/qt4.cpp @@ -335,7 +335,6 @@ static void Init( intf_thread_t *p_intf ) char *psz_path = config_GetPsz( p_intf, "qt-filedialog-path" ); p_intf->p_sys->psz_filepath = EMPTY_STR( psz_path ) ? psz_path : p_intf->p_libvlc->psz_homedir; - delete psz_path; /* Launch */ app->exec(); @@ -354,7 +353,7 @@ static void Init( intf_thread_t *p_intf ) MainInputManager::killInstance(); config_PutPsz( p_intf, "qt-filedialog-path", p_intf->p_sys->psz_filepath ); - delete p_intf->p_sys->psz_filepath; + free( psz_path ); delete app; } diff --git a/modules/gui/qt4/qt4.hpp b/modules/gui/qt4/qt4.hpp index 5f0f7123da..29b1dae4c4 100644 --- a/modules/gui/qt4/qt4.hpp +++ b/modules/gui/qt4/qt4.hpp @@ -52,7 +52,7 @@ struct intf_sys_t VideoWidget *p_video; - char *psz_filepath; + const char *psz_filepath; QMenu * p_popup_menu; }; -- 2.39.5