summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
Diffstat (limited to 'server/src')
-rw-r--r--server/src/admin_connection.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/server/src/admin_connection.cc b/server/src/admin_connection.cc
index 5a15a34..f761023 100644
--- a/server/src/admin_connection.cc
+++ b/server/src/admin_connection.cc
@@ -66,8 +66,10 @@ static std::string admin_listactivesessions(Environment &env)
Session *s = NULL;
SessionAutounlock l(&s);
s = env.sessions.lockedSession(*i);
- str += "Session " + *i + ": "+s->templ+" on "+s->patientid+" "+
- std::string(s->idle()?"[idle]":"[active]")+"\n";
+ if(s) {
+ str += "Session " + *i + ": "+s->templ+" on "+s->patientid+" "+
+ std::string(s->idle()?"[idle]":"[active]")+"\n";
+ }
i++;
}