From 4bff439291a5614f285ea83bf5c5c9c3887b449f Mon Sep 17 00:00:00 2001 From: _Bastler Date: Wed, 6 Oct 2021 11:16:39 +0200 Subject: [PATCH] fix --- src/main/java/de/bstly/board/controller/BaseController.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/de/bstly/board/controller/BaseController.java b/src/main/java/de/bstly/board/controller/BaseController.java index ac08445..ff74cd8 100644 --- a/src/main/java/de/bstly/board/controller/BaseController.java +++ b/src/main/java/de/bstly/board/controller/BaseController.java @@ -64,7 +64,6 @@ public class BaseController { return localUserManager.getByAuth(SecurityContextHolder.getContext().getAuthentication()); } - /** * Gets the gravity. * @@ -74,7 +73,7 @@ public class BaseController { Authentication auth = SecurityContextHolder.getContext().getAuthentication(); if (auth != null && auth.isAuthenticated()) { LocalUser localUser = localUserManager.getByAuth(auth); - if (localUser.getSettings().containsKey("gravity")) { + if (localUser.getSettings() != null && localUser.getSettings().containsKey("gravity")) { try { return Double.parseDouble(localUser.getSettings().get("gravity")); } catch (Exception e) {