From atlantik-devel Sun May 23 00:49:11 2004 From: kde () office ! kde ! org Date: Sun, 23 May 2004 00:49:11 +0000 To: atlantik-devel Subject: [atlantik-cvs] CVS: kdegames/atlantik/client monopigator.cpp, 1.18, Message-Id: <40AFF507.mail5RV1Q7NWM () office ! kde ! org> X-MARC-Message: https://marc.info/?l=atlantik-devel&m=108527336127268 Update of /home/kde/kdegames/atlantik/client In directory office:/tmp/cvs-serv7453/client Modified Files: Tag: KDE_3_2_BRANCH monopigator.cpp Log Message: backport: don't crash when an unresolvable host is in the meta server list Index: monopigator.cpp =================================================================== RCS file: /home/kde/kdegames/atlantik/client/monopigator.cpp,v retrieving revision 1.18 retrieving revision 1.18.2.1 diff -u -d -r1.18 -r1.18.2.1 --- monopigator.cpp 23 Nov 2003 18:42:25 -0000 1.18 +++ monopigator.cpp 23 May 2004 00:49:09 -0000 1.18.2.1 @@ -1,4 +1,4 @@ -// Copyright (c) 2002-2003 Rob Kaper +// Copyright (c) 2002-2004 Rob Kaper // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -113,13 +113,17 @@ // setEnabled(false); parent->sort(); - m_latencyTimer = new KLatencyTimer(port.toInt(), this, "latencyTimer"); QPtrList addresses = KExtendedSocket::lookup(host, port); addresses.setAutoDelete(true); - m_latencyTimer->setHost(addresses.first()->address()); + m_latencyTimer = new KLatencyTimer(port.toInt(), this, "latencyTimer"); - connect(m_latencyTimer, SIGNAL(answer(int)), this, SLOT(updateLatency(int))); - m_latencyTimer->start(); + if ( addresses.count() ) + { + m_latencyTimer->setHost(addresses.first()->address()); + + connect(m_latencyTimer, SIGNAL(answer(int)), this, SLOT(updateLatency(int))); + m_latencyTimer->start(); + } } void MonopigatorEntry::updateLatency(int msec) _______________________________________________ atlantik-cvs mailing list atlantik-cvs@kde.org https://mail.kde.org/mailman/listinfo/atlantik-cvs