diff --git a/db.h b/db.h index e3050f0..e7810a3 100644 --- a/db.h +++ b/db.h @@ -232,7 +232,7 @@ public: stats.nTracked = ourId.size(); stats.nGood = goodId.size(); stats.nNew = unkId.size(); - stats.nAge = time(NULL) - idToInfo[ourId[0]].ourLastTry; + stats.nAge = ourId.size() > 0 ? time(NULL) - idToInfo[ourId[0]].ourLastTry : 0; } } diff --git a/main.cpp b/main.cpp index d6cc3b3..f2535fe 100644 --- a/main.cpp +++ b/main.cpp @@ -341,6 +341,7 @@ vector dnsThread; extern "C" void* ThreadDNS(void* arg) { CDnsThread *thread = (CDnsThread*)arg; thread->run(); + return NULL; } int StatCompare(const CAddrReport& a, const CAddrReport& b) {