From bc45ff3a28d02c58e38ec3c5c360e91bc85fe4f3 Mon Sep 17 00:00:00 2001 From: dubslow Date: Mon, 17 Nov 2014 19:41:34 -0600 Subject: [PATCH] fix crash if no boostrap nodes (fix #791 where "fix" means "mask the underlying problem") --- src/core.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core.cpp b/src/core.cpp index 9d49c6f18..0b7f1ea94 100644 --- a/src/core.cpp +++ b/src/core.cpp @@ -337,6 +337,11 @@ void Core::bootstrapDht() QList 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 ...";