From 2e3282d5e48d1fe5e4fadd8c0965be8ea06e93c9 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Mon, 13 May 2013 12:12:40 +0200 Subject: QCFSocketNotifier: initialize member variable to avoid crash MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The function pointer "maybeCancelWaitForMoreEvents" was never initialized to any value. This caused qt_mac_socket_callback to call that "function" when it had a non-zero value, which caused a crash under some circumstances. Change-Id: I1d31be7b5b7c103fdc0204ffa6e9a5ecbb28d062 Reviewed-by: Tor Arne Vestbø --- src/platformsupport/cfsocketnotifier/qcfsocketnotifier.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/platformsupport/cfsocketnotifier') diff --git a/src/platformsupport/cfsocketnotifier/qcfsocketnotifier.cpp b/src/platformsupport/cfsocketnotifier/qcfsocketnotifier.cpp index 5dcd6a4ffd..c33b684d50 100644 --- a/src/platformsupport/cfsocketnotifier/qcfsocketnotifier.cpp +++ b/src/platformsupport/cfsocketnotifier/qcfsocketnotifier.cpp @@ -101,6 +101,7 @@ void qt_mac_remove_socket_from_runloop(const CFSocketRef socket, CFRunLoopSource QCFSocketNotifier::QCFSocketNotifier() :eventDispatcher(0) +, maybeCancelWaitForMoreEvents(0) { } -- cgit v1.2.3