From 5d8b4bfa59cecfed1f503dacf6ef2f5dc8cb7f2d Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Thu, 5 Jul 2012 03:25:25 +0200 Subject: m_ident Fix casting User pointers to LocalUser pointers blindly --- src/modules/m_ident.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/modules') diff --git a/src/modules/m_ident.cpp b/src/modules/m_ident.cpp index 163487f70..c30e4d200 100644 --- a/src/modules/m_ident.cpp +++ b/src/modules/m_ident.cpp @@ -383,7 +383,11 @@ class ModuleIdent : public Module { /* Module unloading, tidy up users */ if (target_type == TYPE_USER) - OnUserDisconnect((LocalUser*)item); + { + LocalUser* user = IS_LOCAL((User*) item); + if (user) + OnUserDisconnect(user); + } } virtual void OnUserDisconnect(LocalUser *user) -- cgit v1.2.3