From 3c68bbff1ad576dab4e8650b22627f7e406c8a1f Mon Sep 17 00:00:00 2001 From: _Bastler Date: Wed, 6 Oct 2021 11:18:02 +0200 Subject: [PATCH] fix --- pom.xml | 2 +- src/main/java/de/bstly/board/controller/BaseController.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 2a9a491..f64f930 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ UTF-8 11 - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT diff --git a/src/main/java/de/bstly/board/controller/BaseController.java b/src/main/java/de/bstly/board/controller/BaseController.java index ff74cd8..17868bc 100644 --- a/src/main/java/de/bstly/board/controller/BaseController.java +++ b/src/main/java/de/bstly/board/controller/BaseController.java @@ -73,7 +73,8 @@ public class BaseController { Authentication auth = SecurityContextHolder.getContext().getAuthentication(); if (auth != null && auth.isAuthenticated()) { LocalUser localUser = localUserManager.getByAuth(auth); - if (localUser.getSettings() != null && localUser.getSettings().containsKey("gravity")) { + if (localUser != null && localUser.getSettings() != null + && localUser.getSettings().containsKey("gravity")) { try { return Double.parseDouble(localUser.getSettings().get("gravity")); } catch (Exception e) {