fix segmentation fault
@ -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;
}
@ -341,6 +341,7 @@ vector<CDnsThread*> dnsThread;
extern "C" void* ThreadDNS(void* arg) {
CDnsThread *thread = (CDnsThread*)arg;
thread->run();
return NULL;
int StatCompare(const CAddrReport& a, const CAddrReport& b) {