[vlc-devel] [PATCH 1/3] qt: fix uninitialized member in MLBaseModel
Romain Vimont
rom1v at videolabs.io
Thu Dec 17 12:43:05 UTC 2020
On Thu, Dec 17, 2020 at 01:32:48PM +0100, Pierre Lamot wrote:
> ---
> modules/gui/qt/medialibrary/mlbasemodel.hpp | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/modules/gui/qt/medialibrary/mlbasemodel.hpp b/modules/gui/qt/medialibrary/mlbasemodel.hpp
> index a0529700d8..faef1c188a 100644
> --- a/modules/gui/qt/medialibrary/mlbasemodel.hpp
> +++ b/modules/gui/qt/medialibrary/mlbasemodel.hpp
> @@ -143,7 +143,7 @@ protected:
> MLItemId m_parent;
>
> vlc_medialibrary_t* m_ml;
> - MediaLib* m_mediaLib;
> + MediaLib* m_mediaLib = nullptr;
In theory, it is initialized "immediately" (almost like in a
constructor, except that it's initialized just after via a QML property
because it's QML). Nothing should use it uninitialized.
But I'm ok with setting it to nullptr to improve debugging. Same with
m_ml just above btw.
> QString m_search_pattern;
> vlc_ml_sorting_criteria_t m_sort;
> bool m_sort_desc;
> --
> 2.25.1
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list