[NOTEPAD]
authorGregor Schneider <grschneider@gmail.com>
Fri, 16 Apr 2010 14:30:40 +0000 (14:30 +0000)
committerGregor Schneider <grschneider@gmail.com>
Fri, 16 Apr 2010 14:30:40 +0000 (14:30 +0000)
- Create a font even if no registry settings were loaded
- Patch by Rafal Harabien, <rafalh1992 AT o2 DOT pl>
See issue #4066 for more details.

svn path=/trunk/; revision=46897

reactos/base/applications/notepad/settings.c

index 862e4fb..9a68c8b 100644 (file)
@@ -147,16 +147,16 @@ void LoadSettings(void)
                if (dwPointSize != 0)
                        Globals.lfFont.lfHeight = HeightFromPointSize(dwPointSize);
 
-               hFont = CreateFontIndirect(&Globals.lfFont);
-               if (hFont)
-               {
-                       if (Globals.hFont)
-                               DeleteObject(Globals.hFont);
-                       Globals.hFont = hFont;
-               }
-
                RegCloseKey(hKey);
        }
+
+       hFont = CreateFontIndirect(&Globals.lfFont);
+       if (hFont)
+       {
+               if (Globals.hFont)
+                       DeleteObject(Globals.hFont);
+               Globals.hFont = hFont;
+       }
 }
 
 static BOOL SaveDword(HKEY hKey, LPCTSTR pszValueNameT, DWORD dwValue)