From d2f40b710b8540927b31142e294487c14df28ae8 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Fri, 12 Apr 2019 23:28:39 +0200 Subject: [PATCH] Fix a possible stacktrace on RandomPlayQueue --- .../player/controller/RandomPlayQueueController.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/airsonic-main/src/main/java/org/airsonic/player/controller/RandomPlayQueueController.java b/airsonic-main/src/main/java/org/airsonic/player/controller/RandomPlayQueueController.java index c7996cb1..b94f9685 100644 --- a/airsonic-main/src/main/java/org/airsonic/player/controller/RandomPlayQueueController.java +++ b/airsonic-main/src/main/java/org/airsonic/player/controller/RandomPlayQueueController.java @@ -62,7 +62,7 @@ public class RandomPlayQueueController { ModelMap model, HttpServletRequest request, HttpServletResponse response, - @RequestParam(value = "size") int size, + @RequestParam(value = "size") Integer size, @RequestParam(value = "genre", required = false) String genre, @RequestParam(value = "year", required = false) String year, @RequestParam(value = "songRating", required = false) String songRating, @@ -87,6 +87,10 @@ public class RandomPlayQueueController { boolean doesShowStarredSongs = false; boolean doesShowUnstarredSongs = false; + if (size == null) { + size = 24; + } + // Handle the genre filter if (StringUtils.equalsIgnoreCase("any", genre)) { genre = null;