[vlc-commits] qml: correctly set properties of sort control when contentmodel is not available

Prince Gupta git at videolan.org
Thu Jan 14 14:42:17 UTC 2021


vlc | branch: master | Prince Gupta <guptaprince8832 at gmail.com> | Tue Dec 22 19:05:26 2020 +0530| [177b542ee799a0e75ec4e4a915d2b0e4947c9b05] | committer: Pierre Lamot

qml: correctly set properties of sort control when contentmodel is not available

Signed-off-by: Pierre Lamot <pierre at videolabs.io>

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

 modules/gui/qt/maininterface/qml/BannerSources.qml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt/maininterface/qml/BannerSources.qml b/modules/gui/qt/maininterface/qml/BannerSources.qml
index 3279dcdac3..dc28a1a979 100644
--- a/modules/gui/qt/maininterface/qml/BannerSources.qml
+++ b/modules/gui/qt/maininterface/qml/BannerSources.qml
@@ -245,8 +245,8 @@ Widgets.NavigableFocusScope {
                                 }
                             }
 
-                            sortKey: contentModel.sortCriteria
-                            sortOrder: contentModel.sortOrder
+                            sortKey: contentModel ? contentModel.sortCriteria : PlaylistControllerModel.SORT_KEY_NONE
+                            sortOrder: contentModel ? contentModel.sortOrder : undefined
                         }
                     }
 



More information about the vlc-commits mailing list