forked from j62/ctbrec
1
0
Fork 0

Fixed possible NPE in update method

This commit is contained in:
0xboobface 2018-11-28 16:43:30 +01:00
parent 403c1ed2d0
commit ef9566999a
1 changed files with 1 additions and 1 deletions

View File

@ -221,7 +221,7 @@ public class MyFreeCamsModel extends AbstractModel {
setName(state.getNm());
setState(State.of(state.getVs()));
setStreamUrl(streamUrl);
Optional<Double> camScore = Optional.of(state.getM()).map(m -> m.getCamscore());
Optional<Double> camScore = Optional.ofNullable(state.getM()).map(m -> m.getCamscore());
setCamScore(camScore.orElse(0.0));
// preview