This commit is contained in:
_Bastler 2021-10-06 11:18:02 +02:00
parent 4bff439291
commit 3c68bbff1a
2 changed files with 3 additions and 2 deletions

View File

@ -10,7 +10,7 @@
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>11</java.version> <java.version>11</java.version>
<revision>0.4.1-SNAPSHOT</revision> <revision>0.4.2-SNAPSHOT</revision>
</properties> </properties>
<parent> <parent>

View File

@ -73,7 +73,8 @@ public class BaseController {
Authentication auth = SecurityContextHolder.getContext().getAuthentication(); Authentication auth = SecurityContextHolder.getContext().getAuthentication();
if (auth != null && auth.isAuthenticated()) { if (auth != null && auth.isAuthenticated()) {
LocalUser localUser = localUserManager.getByAuth(auth); LocalUser localUser = localUserManager.getByAuth(auth);
if (localUser.getSettings() != null && localUser.getSettings().containsKey("gravity")) { if (localUser != null && localUser.getSettings() != null
&& localUser.getSettings().containsKey("gravity")) {
try { try {
return Double.parseDouble(localUser.getSettings().get("gravity")); return Double.parseDouble(localUser.getSettings().get("gravity"));
} catch (Exception e) { } catch (Exception e) {