Fix possible use-after-free in test connections.

This commit is contained in:
John Preston 2020-02-25 13:40:09 +04:00
parent b2aac8006c
commit 3e3696298f
1 changed files with 2 additions and 1 deletions

View File

@ -189,8 +189,9 @@ void SessionPrivate::appendTestConnection(
});
});
const auto protocolDcId = getProtocolDcId();
InvokeQueued(_testConnections.back().data, [=] {
weak->connectToServer(ip, port, protocolSecret, getProtocolDcId());
weak->connectToServer(ip, port, protocolSecret, protocolDcId);
});
}