GNU bug report logs -
#38564
27.0.50; macOS "emacs -nw" git-gutter-mode segfault
Previous Next
Reported by: Mike Hamrick <mikeh <at> muppetlabs.com>
Date: Wed, 11 Dec 2019 02:17:02 UTC
Severity: normal
Tags: fixed
Merged with 38757
Found in version 27.0.50
Fixed in version 27.1
Done: Robert Pluim <rpluim <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #24 received at 38564 <at> debbugs.gnu.org (full text, mbox):
>>>>> On Wed, 11 Dec 2019 19:37:34 +0000, Alan Third <alan <at> idiocy.org> said:
Alan> On Wed, Dec 11, 2019 at 11:12:41AM +0100, Robert Pluim wrote:
>> Right idea, but one layer lower than needed. ns_color_index_to_rgba
>> should not be calling ns_lookup_indexed_color in non-gui mode. Try
>> this instead:
Alan> Hi Robert, thanks for sorting this. One thing...
>> + if (FRAME_DISPLAY_INFO (f))
Alan> Would it not be better to use FRAME_NS_P?
Yes. In fact, how about reverting my change to ns_color_index_to_rgba
and doing this instead (you canʼt use FRAME_DISPLAY_INFO in
dispextern.h without much bigger changes):
diff --git i/src/dispextern.h w/src/dispextern.h
index 0615b16d71..4bf9f39cd0 100644
--- i/src/dispextern.h
+++ w/src/dispextern.h
@@ -123,7 +123,9 @@ #define NativeRectangle XRectangle
#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;
This bug report was last modified 5 years and 134 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.