From c44332a4d137feaf79ba789750687f26a1bd49d2 Mon Sep 17 00:00:00 2001 From: "kevino@webkit.org" Date: Mon, 9 May 2011 18:26:09 +0000 Subject: [PATCH] Reviewed by Kevin Ollivier. [wx] Add invalid file handle check. https://bugs.webkit.org/show_bug.cgi?id=60483 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@86072 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Source/WebCore/ChangeLog | 11 +++++++++++ Source/WebCore/platform/wx/FileSystemWx.cpp | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index f06f090..98bac6d 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -2,6 +2,17 @@ Reviewed by Kevin Ollivier. + [wx] Add invalid file handle check. + + https://bugs.webkit.org/show_bug.cgi?id=60483 + + * platform/wx/FileSystemWx.cpp: + (WebCore::closeFile): + +2011-05-09 Robin Dunn + + Reviewed by Kevin Ollivier. + [wx] Update the popup menu code to grab the native control and initialize the event handler properly. diff --git a/Source/WebCore/platform/wx/FileSystemWx.cpp b/Source/WebCore/platform/wx/FileSystemWx.cpp index 3644a42..016ea50 100644 --- a/Source/WebCore/platform/wx/FileSystemWx.cpp +++ b/Source/WebCore/platform/wx/FileSystemWx.cpp @@ -121,7 +121,7 @@ String openTemporaryFile(const String& prefix, PlatformFileHandle& handle) void closeFile(PlatformFileHandle& handle) { - if (handle) + if (handle && handle != invalidPlatformFileHandle) delete handle; } -- 1.8.3.1