Reviewed by Kevin Ollivier.
authorkevino@webkit.org <kevino@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 May 2011 18:26:09 +0000 (18:26 +0000)
committerkevino@webkit.org <kevino@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 May 2011 18:26:09 +0000 (18:26 +0000)
[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
Source/WebCore/platform/wx/FileSystemWx.cpp

index f06f090..98bac6d 100644 (file)
@@ -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  <robin@alldunn.com>
+
+        Reviewed by Kevin Ollivier.
+
         [wx] Update the popup menu code to grab the native control and initialize the
         event handler properly.
         
index 3644a42..016ea50 100644 (file)
@@ -121,7 +121,7 @@ String openTemporaryFile(const String& prefix, PlatformFileHandle& handle)
 
 void closeFile(PlatformFileHandle& handle)
 {
-    if (handle)
+    if (handle && handle != invalidPlatformFileHandle)
         delete handle;
 }