[vlc-commits] [Git][videolan/vlc][master] qt: fix invalid release

Steve Lhomme (@robUx4) gitlab at videolan.org
Mon Jan 15 07:00:02 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
bdbc9ce1 by Prince Gupta at 2024-01-15T06:40:20+00:00
qt: fix invalid release

fixes warning of QObject::disconnect and QCoreApplication::postEvent

- - - - -


1 changed file:

- modules/gui/qt/util/base_model_p.hpp


Changes:

=====================================
modules/gui/qt/util/base_model_p.hpp
=====================================
@@ -84,9 +84,12 @@ protected:
         Q_Q(BaseModel);
         emit q->beginResetModel();
         // 'abandon' existing cache and queue it for deletion
-        cache->disconnect(q);
-        cache->deleteLater();
-        cache.release();
+        if (cache)
+        {
+            cache->disconnect(q);
+            cache->deleteLater();
+            cache.release();
+        }
         emit q->endResetModel();
         validateCache();
     }



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/bdbc9ce1918d67487801880792c4c93a112593e6

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/bdbc9ce1918d67487801880792c4c93a112593e6
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list