[try2] wordpad: do not try to close uninitialized handles

James Hawkins truiken at gmail.com
Mon Oct 13 15:04:49 CDT 2008


On Mon, Oct 13, 2008 at 2:42 PM, Andrey Turkin <andrey.turkin at gmail.com> wrote:
> [another approach with smaller changeset, as James suggested]
>
> Fix some functions where CloseHandle was called not matter if previous
> open succeeded or not.
>

@@ -96,12 +96,13 @@ void registry_set_options(HWND hMainWnd)

         registry_set_pagemargins(hKey);

     }



-    RegCloseKey(hKey);

+    if (hKey)

+        RegCloseKey(hKey);

Please get rid of this check for NULL hKey.  We've spent a lot of time
removing such checks.

-- 
James Hawkins



More information about the wine-devel mailing list