[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-27 81b697d 2/2: Fix crash under -nw on macOS properly this time
From: |
Robert Pluim |
Subject: |
emacs-27 81b697d 2/2: Fix crash under -nw on macOS properly this time |
Date: |
Sun, 29 Dec 2019 15:16:05 -0500 (EST) |
branch: emacs-27
commit 81b697d1062efa039b542082b89fc0170b3db42c
Author: Robert Pluim <address@hidden>
Commit: Robert Pluim <address@hidden>
Fix crash under -nw on macOS properly this time
* src/dispextern.h (FACE_COLOR_TO_PIXEL): Only use
ns_color_index_to_rgba when we're running under the NS gui
(Bug#38564).
---
src/dispextern.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/dispextern.h b/src/dispextern.h
index 0615b16..4bf9f39 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -123,7 +123,9 @@ typedef HDC Emacs_Pix_Context;
#ifdef HAVE_NS
#include "nsgui.h"
-#define FACE_COLOR_TO_PIXEL(face_color, frame)
ns_color_index_to_rgba(face_color, frame)
+#define FACE_COLOR_TO_PIXEL(face_color, frame) (FRAME_NS_P (frame) \
+ ? ns_color_index_to_rgba
(face_color, frame) \
+ : face_color)
/* Following typedef needed to accommodate the MSDOS port, believe it or not.
*/
typedef struct ns_display_info Display_Info;
typedef Emacs_Pixmap Emacs_Pix_Container;