1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix crash if no boostrap nodes (fix #791 where "fix" means "mask the underlying problem")

This commit is contained in:
dubslow 2014-11-17 19:41:34 -06:00
parent d533c4089d
commit bc45ff3a28

View File

@ -337,6 +337,11 @@ void Core::bootstrapDht()
QList<Settings::DhtServer> dhtServerList = s.getDhtServerList();
int listSize = dhtServerList.size();
if (listSize == 0)
{
qDebug() << "Settings: no bootstrap list?!?";
return;
}
static int j = qrand() % listSize;
qDebug() << "Core: Bootstraping to the DHT ...";