]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix daemon crashes when linum-mode is turned on early on
authorEli Zaretskii <eliz@gnu.org>
Thu, 14 May 2015 15:48:38 +0000 (18:48 +0300)
committerEli Zaretskii <eliz@gnu.org>
Thu, 14 May 2015 15:48:38 +0000 (18:48 +0300)
* src/window.c (Fwindow_end): Don't try calling display engine
functions on initial-frame frame.  (Bug#20565)

src/window.c

index 0fcf82d43f4a93e62e54ae9d6bd72b1c95f68772..b8281661b4d1277e97899abec972c1c473ff37a1 100644 (file)
@@ -1748,7 +1748,11 @@ if it isn't already recorded.  */)
          || b->clip_changed
          || b->prevent_redisplay_optimizations_p
          || window_outdated (w))
-      && !noninteractive)
+      /* Don't call display routines if we didn't yet create any real
+        frames, because the glyph matrices are not yet allocated in
+        that case.  This could happen in some code that runs in the
+        daemon during initialization (e.g., see bug#20565).  */
+      && !(noninteractive || FRAME_INITIAL_P (WINDOW_XFRAME (w))))
     {
       struct text_pos startp;
       struct it it;