diff --git a/pgadmin/frm/frmQuery.cpp b/pgadmin/frm/frmQuery.cpp index 03e3bf8..396c07c 100644 --- a/pgadmin/frm/frmQuery.cpp +++ b/pgadmin/frm/frmQuery.cpp @@ -1012,7 +1012,8 @@ void frmQuery::OnChangeConnection(wxCommandEvent &ev) pgConn *newconn = dlg.CreateConn(applicationname, createdNewConn); if (newconn && createdNewConn) { - cbConnection->Insert(newconn->GetName(), CreateBitmap(GetServerColour(newconn)), sel, (void *)newconn); + cbConnection->Insert(newconn->GetName(), CreateBitmap(GetServerColour(newconn)), sel); + cbConnection->SetClientData(sel, (void *)newconn); cbConnection->SetSelection(sel); OnChangeConnection(ev); }