Skip to content
Snippets Groups Projects
Commit 453adbf3 authored by rswindell's avatar rswindell
Browse files

Fixed access violations when clicking OK on the "Filter IP" dialog box after

client has disconnected.
parent 172d4c27
No related branches found
No related tags found
No related merge requests found
......@@ -115,18 +115,20 @@ void __fastcall TClientForm::FilterIpMenuItemClick(TObject *Sender)
while(ListItem!=NULL) {
AnsiString prot = ListItem->SubItems->Strings[0];
AnsiString username = ListItem->SubItems->Strings[1];
AnsiString ip_addr = ListItem->SubItems->Strings[2];
wsprintf(str,"Disallow future connections from %s"
,ListItem->SubItems->Strings[2].c_str());
,ip_addr);
res=Application->MessageBox(str,"Filter IP?"
,MB_YESNOCANCEL|MB_ICONQUESTION);
if(res==IDCANCEL)
break;
if(res==IDYES)
MainForm->FilterIP(
ListItem->SubItems->Strings[2].c_str() /* ip_addr */
,ListItem->SubItems->Strings[0].c_str() /* protocol */
,ListItem->SubItems->Strings[1].c_str() /* username */
);
MainForm->FilterIP(ip_addr.c_str(),prot.c_str(),username.c_str());
if(ListView->Selected == NULL)
break;
ListItem=ListView->GetNextItem(ListItem,sdAll,State);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment