From 1e048ad1a60374ff026f021fe836c4f77a3fca60 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 11 Mar 2011 16:42:12 +0100 Subject: [PATCH] Backport 2011-03-08T01:52:20Z!lekktu@gmail.com from trunk. * src/w32xfns.c (select_palette): Check success of RealizePalette against GDI_ERROR, not zero. --- src/ChangeLog | 6 ++++++ src/w32xfns.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index a4a80cbf9f5..75958169951 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-03-11 Juanma Barranquero + + Backport revno:103582 from trunk. + * w32xfns.c (select_palette): Check success of RealizePalette against + GDI_ERROR, not zero. + 2011-03-11 YAMAMOTO Mitsuharu * fringe.c (update_window_fringes): Remove unused variables. diff --git a/src/w32xfns.c b/src/w32xfns.c index 83ffc1c8b5f..0472138e117 100644 --- a/src/w32xfns.c +++ b/src/w32xfns.c @@ -98,7 +98,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