aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/pdumper.c11
-rw-r--r--src/w32dwrite.c4
-rw-r--r--src/w32menu.c5
3 files changed, 14 insertions, 6 deletions
diff --git a/src/pdumper.c b/src/pdumper.c
index c888b659dde..c0b36b1ca44 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -4853,11 +4853,14 @@ struct dump_memory_map_heap_control_block
4853static void 4853static void
4854dump_mm_heap_cb_release (struct dump_memory_map_heap_control_block *cb) 4854dump_mm_heap_cb_release (struct dump_memory_map_heap_control_block *cb)
4855{ 4855{
4856 eassert (cb->refcount > 0); 4856 if (cb)
4857 if (--cb->refcount == 0)
4858 { 4857 {
4859 free (cb->mem); 4858 eassert (cb->refcount > 0);
4860 free (cb); 4859 if (--cb->refcount == 0)
4860 {
4861 free (cb->mem);
4862 free (cb);
4863 }
4861 } 4864 }
4862} 4865}
4863 4866
diff --git a/src/w32dwrite.c b/src/w32dwrite.c
index 32e2644af2c..29f9d5f1fed 100644
--- a/src/w32dwrite.c
+++ b/src/w32dwrite.c
@@ -37,7 +37,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
37#include <math.h> 37#include <math.h>
38#include <windows.h> 38#include <windows.h>
39 39
40#ifndef MINGW_W64 40#if !defined MINGW_W64 && !defined CYGWIN
41# define INITGUID 41# define INITGUID
42#endif 42#endif
43#include <initguid.h> 43#include <initguid.h>
@@ -659,7 +659,7 @@ w32_dwrite_encode_char (struct font *font, int c)
659 if (dwrite_font_face == NULL) 659 if (dwrite_font_face == NULL)
660 return FONT_INVALID_CODE; 660 return FONT_INVALID_CODE;
661 hr = dwrite_font_face->lpVtbl->GetGlyphIndices (dwrite_font_face, 661 hr = dwrite_font_face->lpVtbl->GetGlyphIndices (dwrite_font_face,
662 &c, 1, &index); 662 (UINT32 *) &c, 1, &index);
663 if (verify_hr (hr, "Failed to GetGlyphIndices")) 663 if (verify_hr (hr, "Failed to GetGlyphIndices"))
664 { 664 {
665 if (index == 0) 665 if (index == 0)
diff --git a/src/w32menu.c b/src/w32menu.c
index c3d147841b6..b5f87ebb42c 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -186,6 +186,11 @@ task_dialog_callback (HWND hwnd, UINT msg, WPARAM wParam,
186Lisp_Object 186Lisp_Object
187w32_popup_dialog (struct frame *f, Lisp_Object header, Lisp_Object contents) 187w32_popup_dialog (struct frame *f, Lisp_Object header, Lisp_Object contents)
188{ 188{
189#ifdef NTGUI_UNICODE
190 typedef int (WINAPI *WideCharToMultiByte_Proc)(UINT,DWORD,LPCWSTR,int,LPSTR,
191 int,LPCSTR,LPBOOL);
192 static MultiByteToWideChar_Proc pMultiByteToWideChar = MultiByteToWideChar;
193#endif /* NTGUI_UNICODE */
189 check_window_system (f); 194 check_window_system (f);
190 195
191 if (task_dialog_indirect) 196 if (task_dialog_indirect)