fixing a bug in core.cpp (yet another crash on exit)
authorMarcus Eggenberger <egs@quassel-irc.org>
Mon, 14 Jul 2008 12:54:51 +0000 (14:54 +0200)
committerMarcus Eggenberger <egs@quassel-irc.org>
Mon, 14 Jul 2008 12:56:59 +0000 (14:56 +0200)
src/core/core.cpp

index 4b4aa72..0f652d0 100644 (file)
@@ -532,9 +532,12 @@ void Core::clientDisconnected() {
   if(socket) {
     // here it's safe to call methods on socket!
     qDebug() << qPrintable(tr("Non-authed client disconnected.")) << qPrintable(socket->peerAddress().toString());
   if(socket) {
     // here it's safe to call methods on socket!
     qDebug() << qPrintable(tr("Non-authed client disconnected.")) << qPrintable(socket->peerAddress().toString());
+    blocksizes.remove(socket);
+    clientInfo.remove(socket);
     socket->deleteLater();
   } else {
     // we have to crawl through the hashes and see if we find a victim to remove
     socket->deleteLater();
   } else {
     // we have to crawl through the hashes and see if we find a victim to remove
+    qDebug() << qPrintable(tr("Non-authed client disconnected. (socket allready destroyed)"));
 
     // DO NOT CALL ANY METHODS ON socket!!
     socket = static_cast<QTcpSocket *>(sender());
 
     // DO NOT CALL ANY METHODS ON socket!!
     socket = static_cast<QTcpSocket *>(sender());