summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_spanningtree.cpp')
-rw-r--r--src/modules/m_spanningtree.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index 1ca48aece..feeab0b70 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -1380,13 +1380,16 @@ class TreeSocket : public InspSocket
log(DEBUG,"Got IDLE, sending back IDLE");
char signon[MAXBUF];
char idle[MAXBUF];
- snprintf(signon,MAXBUF,"%lu",(unsigned long)x->signon);
- snprintf(idle,MAXBUF,"%lu",(unsigned long)abs((x->idle_lastmsg)-time(NULL)));
- std::deque<std::string> par;
- par.push_back(x->nick);
- par.push_back(signon);
- par.push_back(idle);
- DoOneToMany(params[0],"IDLE",par);
+ if (x)
+ {
+ snprintf(signon,MAXBUF,"%lu",(unsigned long)x->signon);
+ snprintf(idle,MAXBUF,"%lu",(unsigned long)abs((x->idle_lastmsg)-time(NULL)));
+ std::deque<std::string> par;
+ par.push_back(x->nick);
+ par.push_back(signon);
+ par.push_back(idle);
+ DoOneToMany(params[0],"IDLE",par);
+ }
}
else
{