]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix crash under -nw on macOS properly this time
authorRobert Pluim <rpluim@gmail.com>
Sun, 29 Dec 2019 19:41:28 +0000 (20:41 +0100)
committerRobert Pluim <rpluim@gmail.com>
Sun, 29 Dec 2019 20:15:34 +0000 (21:15 +0100)
* 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

index 0615b16d71285b77f220e929aab9fdbfba79f8a8..4bf9f39cd08354b2f8e422677af2eaf90570719f 100644 (file)
@@ -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;