Fix crash in webadmin when adding a new user.

My recent patch, which added ability to put arbitrary bindhost when
global list is missing, broke it...

Thanks to Jord for reporting it.
This commit is contained in:
Alexey Sokolov
2012-04-08 00:24:26 +07:00
parent ce6a9ce327
commit 6876961b79
+4 -2
View File
@@ -970,8 +970,10 @@ public:
Tmpl["BindHostEdit"] = "true";
const VCString& vsBindHosts = CZNC::Get().GetBindHosts();
if (vsBindHosts.empty()) {
Tmpl["BindHost"] = pUser->GetBindHost();
Tmpl["DCCBindHost"] = pUser->GetDCCBindHost();
if (pUser) {
Tmpl["BindHost"] = pUser->GetBindHost();
Tmpl["DCCBindHost"] = pUser->GetDCCBindHost();
}
} else {
bool bFoundBindHost = false;
bool bFoundDCCBindHost = false;