[vlc-devel] [PATCH 5/5] gui/qt: extended_panels: ChangeVFiltersString: NULL check

Filip Roséen filip at atch.se
Sat Feb 25 07:31:45 CET 2017


GetVFilterType returns NULL on error, meaning that it is not
guaranteed that psz_filter_type contains what we require: this change
make sure that we abort ChangeVFiltersString if the type is unknown.
---
 modules/gui/qt/components/extended_panels.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/gui/qt/components/extended_panels.cpp b/modules/gui/qt/components/extended_panels.cpp
index 6a9c947520..e1469baf58 100644
--- a/modules/gui/qt/components/extended_panels.cpp
+++ b/modules/gui/qt/components/extended_panels.cpp
@@ -306,6 +306,9 @@ static void ChangeVFiltersString( struct intf_thread_t *p_intf, const char *psz_
 {
     const char *psz_filter_type = GetVFilterType( p_intf, psz_name );
 
+    if( psz_filter_type == NULL )
+        return;
+
     QString result = ChangeFiltersString( p_intf, psz_filter_type, psz_name, b_add );
 
     /* Vout is not kept, so put that in the config */
-- 
2.11.1



More information about the vlc-devel mailing list