Fix a crash with OnClientLogin()

A client doesn't necessarily have a network after logging in (e.g. could have
used an invalid network name).

This is another crash found by exoa, thanks.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter
2011-09-12 17:31:13 +02:00
parent 9e3019db72
commit 3e9ad07d85
+5 -1
View File
@@ -666,7 +666,11 @@ void CClient::AcceptLogin(CUser& User) {
SendMotd();
NETWORKMODULECALL(OnClientLogin(), m_pUser, m_pNetwork, this, NOTHING);
if (m_pNetwork) {
NETWORKMODULECALL(OnClientLogin(), m_pUser, m_pNetwork, this, NOTHING);
} else {
USERMODULECALL(OnClientLogin(), m_pUser, this, NOTHING);
}
}
void CClient::Timeout() {