From 640a725dd156944b43a6620d275c869ba7b72590 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Fri, 23 Feb 2024 22:43:55 -0500 Subject: [PATCH] Need to set value to something in the range Or it crashes --- .../java/eu/siacs/conversations/entities/Conversation.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/entities/Conversation.java b/src/main/java/eu/siacs/conversations/entities/Conversation.java index bac925d914c80f70c8b115a88cb112bbe8a56f71..ba517c05bd92d1dd381e24e79884ce460e0ddf62 100644 --- a/src/main/java/eu/siacs/conversations/entities/Conversation.java +++ b/src/main/java/eu/siacs/conversations/entities/Conversation.java @@ -2465,7 +2465,11 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl if (max == null) max = options.get(options.size()-1); } - if (field.getValues().size() > 0) binding.slider.setValue(Float.valueOf(field.getValue().getContent())); + if (field.getValues().size() > 0) { + binding.slider.setValue(Float.valueOf(field.getValue().getContent())); + } else { + binding.slider.setValue(min == null ? Float.MIN_VALUE : min); + } binding.slider.setValueFrom(min == null ? Float.MIN_VALUE : min); binding.slider.setValueTo(max == null ? Float.MAX_VALUE : max); if ("xs:integer".equals(datatype) || "xs:int".equals(datatype) || "xs:long".equals(datatype) || "xs:short".equals(datatype) || "xs:byte".equals(datatype)) {