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:
parent
d533c4089d
commit
bc45ff3a28
|
@ -337,6 +337,11 @@ void Core::bootstrapDht()
|
||||||
QList<Settings::DhtServer> dhtServerList = s.getDhtServerList();
|
QList<Settings::DhtServer> dhtServerList = s.getDhtServerList();
|
||||||
|
|
||||||
int listSize = dhtServerList.size();
|
int listSize = dhtServerList.size();
|
||||||
|
if (listSize == 0)
|
||||||
|
{
|
||||||
|
qDebug() << "Settings: no bootstrap list?!?";
|
||||||
|
return;
|
||||||
|
}
|
||||||
static int j = qrand() % listSize;
|
static int j = qrand() % listSize;
|
||||||
|
|
||||||
qDebug() << "Core: Bootstraping to the DHT ...";
|
qDebug() << "Core: Bootstraping to the DHT ...";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user