From fd7d30ec02785084c357cf85c990501fbb97b9cf Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 4 May 2010 11:38:23 +0200 Subject: fix crash in QLocalServer::close on Windows If _q_onNewConnection failed, then QLocalServer got into a bad state. QLocalServer::isListening() still returned true and QLocalServer::close() crashed. Task-number: QTBUG-10388 Reviewed-by: ossi --- src/network/socket/qlocalserver_win.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/socket/qlocalserver_win.cpp b/src/network/socket/qlocalserver_win.cpp index e820f73..50d6ca4 100644 --- a/src/network/socket/qlocalserver_win.cpp +++ b/src/network/socket/qlocalserver_win.cpp @@ -167,8 +167,8 @@ void QLocalServerPrivate::_q_onNewConnection() q->incomingConnection((quintptr)handle); } else { if (GetLastError() != ERROR_IO_INCOMPLETE) { + q->close(); setError(QLatin1String("QLocalServerPrivate::_q_onNewConnection")); - closeServer(); return; } -- cgit v0.12