[vlc-devel] commit: Fix a crash in Preferences. (Jean-Baptiste Kempf )
git version control
git at videolan.org
Thu Aug 7 21:13:08 CEST 2008
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Aug 7 12:13:45 2008 -0700| [5c66f395912cbb4703aec4495259f6b0c431a35a] | committer: Jean-Baptiste Kempf
Fix a crash in Preferences.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5c66f395912cbb4703aec4495259f6b0c431a35a
---
modules/gui/qt4/components/preferences_widgets.cpp | 9 +++++++--
modules/gui/qt4/components/preferences_widgets.hpp | 1 +
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/modules/gui/qt4/components/preferences_widgets.cpp b/modules/gui/qt4/components/preferences_widgets.cpp
index adf0574..76db951 100644
--- a/modules/gui/qt4/components/preferences_widgets.cpp
+++ b/modules/gui/qt4/components/preferences_widgets.cpp
@@ -97,6 +97,9 @@ ConfigControl *ConfigControl::createControl( vlc_object_t *p_this,
case CONFIG_ITEM_MODULE_LIST_CAT:
p_control = new ModuleListConfigControl( p_this, p_item, parent, true,
l, line );
+ /* Special Hack for a bug in video-filter */
+ if( qobject_cast<ModuleListConfigControl *>( p_control )->groupBox == NULL )
+ return NULL;
break;
case CONFIG_ITEM_STRING:
if( !p_item->i_list )
@@ -607,6 +610,7 @@ ModuleListConfigControl::ModuleListConfigControl( vlc_object_t *_p_this,
VStringConfigControl( _p_this, _p_item, _parent )
{
groupBox = NULL;
+ /* Special Hack */
if( !p_item->psz_text ) return;
groupBox = new QGroupBox ( qtr(p_item->psz_text) );
@@ -701,13 +705,14 @@ void ModuleListConfigControl::finish( bool bycat )
}
vlc_list_release( p_list );
text->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
- if( groupBox )
- groupBox->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
+ assert( groupBox );
+ groupBox->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
}
#undef CHECKBOX_LISTS
QString ModuleListConfigControl::getValue()
{
+ assert( text );
return text->text();
}
diff --git a/modules/gui/qt4/components/preferences_widgets.hpp b/modules/gui/qt4/components/preferences_widgets.hpp
index 715f26a..293b507 100644
--- a/modules/gui/qt4/components/preferences_widgets.hpp
+++ b/modules/gui/qt4/components/preferences_widgets.hpp
@@ -356,6 +356,7 @@ struct checkBoxListItem {
class ModuleListConfigControl : public VStringConfigControl
{
Q_OBJECT;
+ friend class ConfigControl;
public:
ModuleListConfigControl( vlc_object_t *, module_config_t *, QWidget *,
bool, QGridLayout*, int& );
More information about the vlc-devel
mailing list