randomizer: do not pass NULL to memcpy()
All threads resolved!
All threads resolved!
Compare changes
+ 3
− 2
@@ -36,8 +36,9 @@ vlc_playlist_PlaybackOrderChanged(vlc_playlist_t *playlist)
When switching playback order from NORMAL to RANDOM, the current playlist items are added to the randomizer.
However, if the playlist is empty, the items vector is empty, and its `.data field is NULL. This causes the following error in ASAN:
../../src/playlist/randomizer.c:426:10: runtime error: null pointer passed as argument 2, which is declared to never be null
If the playlist size is 0, then do not call randomizer_Add()
at all.
VideoLAN code repository instance