From: Juanma Barranquero Date: Fri, 11 Mar 2011 15:42:12 +0000 (+0100) Subject: Backport 2011-03-08T01:52:20Z!lekktu@gmail.com from trunk. X-Git-Tag: emacs-pretest-24.0.90~104^3~106 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1e048ad1a60374ff026f021fe836c4f77a3fca60;p=emacs.git 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. --- 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)