From 411814a852dd16cd634b79eceeff5d5aa9483d96 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Fri, 05 Jun 2020 16:17:28 +0800
Subject: [PATCH] Merge branch 'master' of https://gitee.com/chonggaoxiao/new_excoin.git

---
 src/main/java/com/xcong/excoin/common/LoginUserUtils.java |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/xcong/excoin/common/LoginUserUtils.java b/src/main/java/com/xcong/excoin/common/LoginUserUtils.java
index 64c0aa2..0c24019 100644
--- a/src/main/java/com/xcong/excoin/common/LoginUserUtils.java
+++ b/src/main/java/com/xcong/excoin/common/LoginUserUtils.java
@@ -34,6 +34,10 @@
      * @return MemberEntity
      */
     public static MemberEntity getUser() {
+        if (SecurityContextHolder.getContext().getAuthentication() == null) {
+            return null;
+        }
+
         if (SecurityContextHolder.getContext().getAuthentication().getPrincipal().equals(ANON)) {
             return null;
         } else {

--
Gitblit v1.9.1