From fc172bff6ee80509a35834541baa347652863343 Mon Sep 17 00:00:00 2001 From: psychon Date: Mon, 28 Jan 2008 16:28:10 +0000 Subject: [PATCH] Fix a NULL pointer dereference in the 'add user' page of webadmin This was just recently introduced in rev 935 "Display user's vhost if it's not in the global vhost list". Thanks to icu and Kuja for reporting. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@937 726aef4b-f618-498e-8847-2d620e286838 --- modules/webadmin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/webadmin.cpp b/modules/webadmin.cpp index a15fbdbf..af1e86d9 100644 --- a/modules/webadmin.cpp +++ b/modules/webadmin.cpp @@ -872,7 +872,7 @@ bool CWebAdminSock::UserPage(CString& sPageRet, CUser* pUser) { } // If our current vhost is not in the global list... - if (!bFoundVHost && !pUser->GetVHost().empty()) { + if (pUser && !bFoundVHost && !pUser->GetVHost().empty()) { CTemplate& l = m_Template.AddRow("VHostLoop"); l["VHost"] = pUser->GetVHost();