fix a resource leak
authorChristoph von Wittich <christoph_vw@reactos.org>
Sun, 7 Oct 2007 00:43:43 +0000 (00:43 +0000)
committerChristoph von Wittich <christoph_vw@reactos.org>
Sun, 7 Oct 2007 00:43:43 +0000 (00:43 +0000)
svn path=/trunk/; revision=29432

reactos/base/applications/notepad/main.c

index 2f357ab..3e28322 100644 (file)
@@ -328,6 +328,8 @@ static LRESULT WINAPI NOTEPAD_WndProc(HWND hWnd, UINT msg, WPARAM wParam,
 
     case WM_CLOSE:
         if (DoCloseFile()) {
+                       if (Globals.hFont)
+                               DeleteObject(Globals.hFont);
             DestroyWindow(hWnd);
         }
         break;