From 195cb3c9bc3d496a37c2e87b7e55c1ac76e540a2 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Sun, 21 Jul 2024 16:53:59 +0100 Subject: [PATCH] Set initial random song idx independently of CatSongs This fixes a crash on startup --- src/screens/UScreenSong.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/screens/UScreenSong.pas b/src/screens/UScreenSong.pas index 6ce4e2e2b..bc1ac2e5d 100644 --- a/src/screens/UScreenSong.pas +++ b/src/screens/UScreenSong.pas @@ -1858,8 +1858,8 @@ constructor TScreenSong.Create; LastSelectMouse := 0; LastSelectTime := 0; - NextRandomSongIdx := CatSongs.VisibleSongs; - NextRandomSearchIdx := CatSongs.VisibleSongs; + NextRandomSongIdx := High(cardinal); + NextRandomSearchIdx := High(cardinal); end;