From 1c2cc4efceea675cfa303414478e4abd160e26d0 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 8 Mar 2011 02:52:20 +0100 Subject: [PATCH] src/w32xfns.c (select_palette): Check success of RealizePalette against GDI_ERROR, not zero. --- src/ChangeLog | 5 +++++ src/w32xfns.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 46ad067c9cd..b73e3d0c860 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-03-08 Juanma Barranquero + + * w32xfns.c (select_palette): Check success of RealizePalette against + GDI_ERROR, not zero. + 2011-03-07 Ben Key * w32fns.c (FILE_NAME_COMBO_BOX, FILE_NAME_LIST): Define. diff --git a/src/w32xfns.c b/src/w32xfns.c index df9acca5fb9..fbbf11bd65c 100644 --- a/src/w32xfns.c +++ b/src/w32xfns.c @@ -97,7 +97,7 @@ select_palette (FRAME_PTR f, HDC hdc) else f->output_data.w32->old_palette = NULL; - if (RealizePalette (hdc)) + if (RealizePalette (hdc) != GDI_ERROR) { Lisp_Object frame, framelist; FOR_EACH_FRAME (framelist, frame) -- 2.39.2