diff options
| author | Karoly Lorentey | 2005-07-10 20:44:37 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2005-07-10 20:44:37 +0000 |
| commit | 19d9c7bbbf0880ee47804b2ede6e61e375479398 (patch) | |
| tree | a1da00a5cbb34e6229fcd825b13d56c2bbf50140 | |
| parent | 520c4dfd15c6aa2c934098212277bac268346eb3 (diff) | |
| download | emacs-19d9c7bbbf0880ee47804b2ede6e61e375479398.tar.gz emacs-19d9c7bbbf0880ee47804b2ede6e61e375479398.zip | |
At long last, fix annoying SELECTED_FRAME crashes after unexpected connection failures. Yay!
* src/xdisp.c (select_frame_for_redisplay): Add xassert for FRAME_LIVE_P.
(unwind_redisplay): Don't restore previous frame if it has been deleted.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-379
| -rw-r--r-- | src/xdisp.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index a1ff09739d0..c2091729821 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -10037,6 +10037,8 @@ select_frame_for_redisplay (frame) | |||
| 10037 | Lisp_Object tail, sym, val; | 10037 | Lisp_Object tail, sym, val; |
| 10038 | Lisp_Object old = selected_frame; | 10038 | Lisp_Object old = selected_frame; |
| 10039 | 10039 | ||
| 10040 | xassert (FRAME_LIVE_P (frame)); | ||
| 10041 | |||
| 10040 | selected_frame = frame; | 10042 | selected_frame = frame; |
| 10041 | 10043 | ||
| 10042 | for (tail = XFRAME (frame)->param_alist; CONSP (tail); tail = XCDR (tail)) | 10044 | for (tail = XFRAME (frame)->param_alist; CONSP (tail); tail = XCDR (tail)) |
| @@ -10815,7 +10817,8 @@ redisplay_preserve_echo_area (from_where) | |||
| 10815 | redisplay_internal. Reset redisplaying_p to the value it had | 10817 | redisplay_internal. Reset redisplaying_p to the value it had |
| 10816 | before redisplay_internal was called, and clear | 10818 | before redisplay_internal was called, and clear |
| 10817 | prevent_freeing_realized_faces_p. It also selects the previously | 10819 | prevent_freeing_realized_faces_p. It also selects the previously |
| 10818 | selected frame. */ | 10820 | selected frame, unless it has been deleted (by an X connection |
| 10821 | failure during redisplay, for example). */ | ||
| 10819 | 10822 | ||
| 10820 | static Lisp_Object | 10823 | static Lisp_Object |
| 10821 | unwind_redisplay (val) | 10824 | unwind_redisplay (val) |
| @@ -10826,7 +10829,8 @@ unwind_redisplay (val) | |||
| 10826 | old_redisplaying_p = XCAR (val); | 10829 | old_redisplaying_p = XCAR (val); |
| 10827 | redisplaying_p = XFASTINT (old_redisplaying_p); | 10830 | redisplaying_p = XFASTINT (old_redisplaying_p); |
| 10828 | old_frame = XCDR (val); | 10831 | old_frame = XCDR (val); |
| 10829 | if (! EQ (old_frame, selected_frame)) | 10832 | if (! EQ (old_frame, selected_frame) |
| 10833 | && FRAME_LIVE_P (XFRAME (old_frame))) | ||
| 10830 | select_frame_for_redisplay (old_frame); | 10834 | select_frame_for_redisplay (old_frame); |
| 10831 | return Qnil; | 10835 | return Qnil; |
| 10832 | } | 10836 | } |