[vlc-commits] qt: remove extraneous assertion in NetworkModel

Pierre Lamot git at videolan.org
Mon Oct 14 11:59:21 CEST 2019


vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Thu Sep 19 15:44:58 2019 +0200| [ca8329120f0df0fad0d2c8643b2248c2d969295d] | committer: Jean-Baptiste Kempf

qt: remove extraneous assertion in NetworkModel

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ca8329120f0df0fad0d2c8643b2248c2d969295d
---

 modules/gui/qt/components/mediacenter/mlnetworkmodel.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt/components/mediacenter/mlnetworkmodel.cpp b/modules/gui/qt/components/mediacenter/mlnetworkmodel.cpp
index 5dc85bde9e..0b8901241c 100644
--- a/modules/gui/qt/components/mediacenter/mlnetworkmodel.cpp
+++ b/modules/gui/qt/components/mediacenter/mlnetworkmodel.cpp
@@ -107,7 +107,8 @@ bool MLNetworkModel::setData( const QModelIndex& idx, const QVariant& value, int
     if ( role != NETWORK_INDEXED )
         return false;
     auto enabled = value.toBool();
-    assert( m_items[idx.row()].indexed != enabled );
+    if ( m_items[idx.row()].indexed == enabled )
+        return  false;
     int res;
     if ( enabled )
         res = vlc_ml_add_folder( m_ml, qtu( m_items[idx.row()].mainMrl.toString( QUrl::None ) ) );



More information about the vlc-commits mailing list