diff options
author | Alan Third <alan@idiocy.org> | 2020-10-22 19:47:17 +0100 |
---|---|---|
committer | Alan Third <alan@idiocy.org> | 2020-10-22 20:05:59 +0100 |
commit | 87239f0a5c613dc716328e129bf79b69979b8a12 (patch) | |
tree | 4c65f99de2a611bbcbfeb3f235471c936d2ecd44 /src/nsterm.m | |
parent | 8c7a55531b400dd3d9aa1dacd2bac3ee06b56ff1 (diff) | |
download | emacs-87239f0a5c613dc716328e129bf79b69979b8a12.tar.gz |
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/nsterm.m')
-rw-r--r-- | src/nsterm.m | 6 |
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) if (!face) face = FRAME_DEFAULT_FACE (f); + /* Sometimes with new frames we reach this point and have no + face. I'm not sure why we have a live frame but no face, so + just give up. */ + if (!face) + return; + ns_focus (f, &frame_rect, 1); [ns_lookup_indexed_color (NS_FACE_BACKGROUND (face), f) set]; for (int i = 0; i < 4 ; i++) |