fixing a bug in core.cpp (yet another crash on exit)
[quassel.git] / 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());