prevent panic when session is nil

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
Jörn Friedrich Dreyer
2023-09-21 16:43:44 +02:00
parent c62d19cf32
commit ea5a60cf56

View File

@@ -36,5 +36,8 @@ type cs3Session struct {
// User returns the cs3 user of the session
func (s *cs3Session) User() *cs3user.User {
if s == nil {
return nil
}
return s.u
}