Fixed crash on leave chat

This commit is contained in:
Torsten Schulz
2024-02-21 16:09:28 +01:00
parent ab8f84f371
commit 064304a506
3 changed files with 12 additions and 7 deletions

View File

@@ -844,7 +844,7 @@ void App::addLeaveButton() {
}
void App::logout() {
server_.disconnect(this);
server_.addToDisconnectList(this);
userListContainer_->clear();
menuContainer_->clear();
userName = "";
@@ -1116,7 +1116,6 @@ void App::showPartnerSites() {
for (size_t i = 0; i < doc.GetRowCount(); ++i) {
auto url = doc.GetCell<std::string>(1, i);
auto name = doc.GetCell<std::string>(0, i);
std::cout << url << std::endl;
auto link = Wt::WLink(url);
link.setTarget(Wt::LinkTarget::NewWindow);
contentLayout->addNew<Wt::WAnchor>(link, name);