QTfrontend/hwform.cpp
changeset 659 5eafb20566f1
parent 658 a7e625f5d9d0
child 660 7c155e849602
--- a/QTfrontend/hwform.cpp	Fri Dec 14 15:02:46 2007 +0000
+++ b/QTfrontend/hwform.cpp	Fri Dec 14 15:36:00 2007 +0000
@@ -432,9 +432,9 @@
   _NetConnect("localhost", pnetserver->getRunningPort(), ui.pageOptions->editNetNick->text());
 
   if (ui.pageNet->rbLocalGame->isChecked())
-    pRegisterServer = new HWNetUdpServer(0, "hedgewars server", ui.pageNetServer->sbPort->value());
+    pRegisterServer = new HWNetUdpServer(0, ui.pageNetServer->leServerDescr->text(), ui.pageNetServer->sbPort->value());
   else
-    pRegisterServer = new HWNetWwwServer(0, "hedgewars server", ui.pageNetServer->sbPort->value());
+    pRegisterServer = new HWNetWwwServer(0, ui.pageNetServer->leServerDescr->text(), ui.pageNetServer->sbPort->value());
 }
 
 void HWForm::NetDisconnect()
@@ -446,7 +446,8 @@
   }
   if(pnetserver) {
     pRegisterServer->unregister();
-    pRegisterServer->deleteLater();
+    pRegisterServer = 0;
+
     pnetserver->StopServer();
     delete pnetserver;
     pnetserver=0;