aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Third2020-10-22 19:47:17 +0100
committerAlan Third2020-10-22 20:05:59 +0100
commit87239f0a5c613dc716328e129bf79b69979b8a12 (patch)
tree4c65f99de2a611bbcbfeb3f235471c936d2ecd44 /src
parent8c7a55531b400dd3d9aa1dacd2bac3ee06b56ff1 (diff)
downloademacs-87239f0a5c613dc716328e129bf79b69979b8a12.tar.gz
emacs-87239f0a5c613dc716328e129bf79b69979b8a12.zip
Fix crash when no face is defined (bug#44058, bug#43973)
* src/nsterm.m (ns_clear_under_internal_border): If face is null, don't try drawing anything.
Diffstat (limited to 'src')
-rw-r--r--src/nsterm.m6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nsterm.m b/src/nsterm.m
index a702a051d00..fa38350a2f6 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -3048,6 +3048,12 @@ ns_clear_under_internal_border (struct frame *f)
3048 if (!face) 3048 if (!face)
3049 face = FRAME_DEFAULT_FACE (f); 3049 face = FRAME_DEFAULT_FACE (f);
3050 3050
3051 /* Sometimes with new frames we reach this point and have no
3052 face. I'm not sure why we have a live frame but no face, so
3053 just give up. */
3054 if (!face)
3055 return;
3056
3051 ns_focus (f, &frame_rect, 1); 3057 ns_focus (f, &frame_rect, 1);
3052 [ns_lookup_indexed_color (NS_FACE_BACKGROUND (face), f) set]; 3058 [ns_lookup_indexed_color (NS_FACE_BACKGROUND (face), f) set];
3053 for (int i = 0; i < 4 ; i++) 3059 for (int i = 0; i < 4 ; i++)