From 5f42a7eba296b36aa62f9a6019928fd313020ec3 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 19 Nov 2007 09:14:38 +0000 Subject: [PATCH] (w32_init_bdf_font, w32_BDF_to_x_font): CreateFileMapping returns NULL on failure. --- src/ChangeLog | 5 +++++ src/w32bdf.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 0fb4f189fb9..5d3fdf4b9af 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2007-11-19 Jason Rumney + + * w32bdf.c (w32_init_bdf_font, w32_BDF_to_x_font): CreateFileMapping + returns NULL on failure. + 2007-11-16 Stefan Monnier * search.c (Fset_match_data): Remove the `evaporate' feature. diff --git a/src/w32bdf.c b/src/w32bdf.c index 80ef098d8de..4a12b1f0190 100644 --- a/src/w32bdf.c +++ b/src/w32bdf.c @@ -261,7 +261,7 @@ w32_init_bdf_font(char *filename) error("Fail to open BDF file"); } hfilemap = CreateFileMapping(hfile, NULL, PAGE_READONLY, 0, 0, NULL); - if (hfilemap == INVALID_HANDLE_VALUE) + if (!hfilemap) { CloseHandle(hfile); error("Can't map font"); @@ -828,7 +828,7 @@ int w32_BDF_to_x_font (char *file, char* xstr, int len) size = fileinfo.nFileSizeLow; hfilemap = CreateFileMapping (hfile, NULL, PAGE_READONLY, 0, 0, NULL); - if (hfilemap == INVALID_HANDLE_VALUE) + if (!hfilemap) { CloseHandle (hfile); return 0; -- 2.39.2