emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 87239f0 1/2: Fix crash when no face is defined (bug#44058, bug#43


From: Alan Third
Subject: master 87239f0 1/2: Fix crash when no face is defined (bug#44058, bug#43973)
Date: Thu, 22 Oct 2020 15:28:39 -0400 (EDT)

branch: master
commit 87239f0a5c613dc716328e129bf79b69979b8a12
Author: Alan Third <alan@idiocy.org>
Commit: Alan Third <alan@idiocy.org>

    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.
---
 src/nsterm.m | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/nsterm.m b/src/nsterm.m
index a702a05..fa38350 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++)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]