[atlantik-cvs] CVS: kdegames/atlantik/client main.h,1.44,1.45 monopigator.cpp,1.21,1.22
[email protected] Sun, 23 May 2004 02:45:20 +0200
| Newsgroups | gmane.comp.kde.devel.atlantik |
|---|---|
| Message-ID | <[email protected]> |
Update of /home/kde/kdegames/atlantik/client In directory office:/tmp/cvs-serv7343/client Modified Files: main.h monopigator.cpp Log Message: don't crash when an unresolvable host is in the meta server list Index: main.h =================================================================== RCS file: /home/kde/kdegames/atlantik/client/main.h,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- main.h 10 Feb 2004 19:46:34 -0000 1.44 +++ main.h 23 May 2004 00:45:18 -0000 1.45 @@ -18,7 +18,7 @@ #define ATLANTIK_MAIN_H #define ATLANTIK_VERSION 070 -#define ATLANTIK_VERSION_STRING "0.7.0 (CVS >= 20040122)" +#define ATLANTIK_VERSION_STRING "0.7.0 (CVS >= 20040523)" #define ATLANTIK_VERSION_MAJOR 0 #define ATLANTIK_VERSION_MINOR 7 Index: monopigator.cpp =================================================================== RCS file: /home/kde/kdegames/atlantik/client/monopigator.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- monopigator.cpp 10 Feb 2004 19:46:34 -0000 1.21 +++ monopigator.cpp 23 May 2004 00:45:18 -0000 1.22 @@ -1,4 +1,4 @@ -// Copyright (c) 2002-2003 Rob Kaper <[email protected]> +// Copyright (c) 2002-2004 Rob Kaper <[email protected]> // // 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<KAddressInfo> 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)