diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2012-02-23 10:42:17 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2012-02-23 10:42:17 +0100 |
commit | d0094998c68419101d518e31135694bbba6a9a22 (patch) | |
tree | c1e11776a6585d56d6f32a920df3ec8fea806075 | |
parent | 2f951a372c5330b4e8a8209122905e073d189bda (diff) |
Fix potential segfault
-rw-r--r-- | server/src/admin_connection.cc | 6 |
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++; } |