fix a segfault related to tcp servers deleting themselves without removing themselves from the internal server list first.
authorsheepluva
Wed, 05 Sep 2012 12:36:47 +0200
changeset 7673 e06b83cbde74
parent 7672 686ba86ae0e3
child 7674 aead327f1e1a
child 7675 58620e9e5ed5
fix a segfault related to tcp servers deleting themselves without removing themselves from the internal server list first. (e.g. happens if game fails to start due to missing hwengine binary. a second start attempt will lead to a segfault, even if you correctly install the binary.)
QTfrontend/net/tcpBase.cpp
--- a/QTfrontend/net/tcpBase.cpp	Tue Sep 04 18:40:53 2012 -0400
+++ b/QTfrontend/net/tcpBase.cpp	Wed Sep 05 12:36:47 2012 +0200
@@ -96,6 +96,10 @@
  /*   if(srvsList.size()==1) srvsList.pop_front();
     emit isReadyNow();*/
     IPCSocket->deleteLater();
+
+    // make sure this object is not in the server list anymore
+    srvsList.removeOne(this);
+
     deleteLater();
 }