From 1a8f67938c4146614fec3788c7868dc1a314cc84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20K=C3=BCmmel?= Date: Fri, 22 Feb 2013 09:58:41 +0100 Subject: Fix CreateFileMapping() error handling CreateFileMapping() returns NULL in case of an error. The patch corrects the wrong testing on INVALID_HANDLE_VALUE, and sets NULL for invalid handles. Change-Id: Iaab4945ed88ee92bbf9a0871e95a5820dd1a56ed Reviewed-by: Oswald Buddenhagen Reviewed-by: Joerg Bornemann --- src/corelib/io/qfsfileengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/io/qfsfileengine.cpp') diff --git a/src/corelib/io/qfsfileengine.cpp b/src/corelib/io/qfsfileengine.cpp index b1d7ca9dd1..3963416084 100644 --- a/src/corelib/io/qfsfileengine.cpp +++ b/src/corelib/io/qfsfileengine.cpp @@ -128,7 +128,7 @@ void QFSFileEnginePrivate::init() #ifdef Q_OS_WIN fileAttrib = INVALID_FILE_ATTRIBUTES; fileHandle = INVALID_HANDLE_VALUE; - mapHandle = INVALID_HANDLE_VALUE; + mapHandle = NULL; #ifndef Q_OS_WINCE cachedFd = -1; #endif -- cgit v1.2.3