Commit ece2d4ed authored by Jan Djärv's avatar Jan Djärv
Browse files

Don't crash if an X terminal is deleted with force == t.

* xftfont.c (xftfont_end_for_frame): Just return if dpyinfo->display
is NULL.

* xterm.c (x_delete_terminal): Set dpyinfo->display to NULL.

* frame.c (frame_make_pointer_invisible)
(frame_make_pointer_visible): Just return if there isn't any selected
frame.
parent 59ffcfc4
2009-11-27 Jan Djärv <jan.h.d@swipnet.se>
* xftfont.c (xftfont_end_for_frame): Just return if dpyinfo->display
is NULL.
* xterm.c (x_delete_terminal): Set dpyinfo->display to NULL.
* frame.c (frame_make_pointer_invisible)
(frame_make_pointer_visible): Just return if there isn't any selected
frame.
* search.c (simple_search): Remove warning by making *p const.
2009-11-26 Dan Nicolaescu <dann@ics.uci.edu>
......
......@@ -4377,6 +4377,9 @@ frame_make_pointer_invisible ()
{
if (! NILP (Vmake_pointer_invisible))
{
if (!FRAMEP (selected_frame) || !FRAME_LIVE_P (XFRAME (selected_frame)))
return;
struct frame *f = SELECTED_FRAME ();
if (f && !f->pointer_invisible
&& FRAME_TERMINAL (f)->toggle_invisible_pointer_hook)
......@@ -4394,6 +4397,9 @@ frame_make_pointer_visible ()
/* We don't check Vmake_pointer_invisible here in case the
pointer was invisible when Vmake_pointer_invisible was set to nil. */
if (!FRAMEP (selected_frame) || !FRAME_LIVE_P (XFRAME (selected_frame)))
return;
struct frame *f = SELECTED_FRAME ();
if (f && f->pointer_invisible && f->mouse_moved
&& FRAME_TERMINAL (f)->toggle_invisible_pointer_hook)
......
......@@ -668,7 +668,12 @@ static int
xftfont_end_for_frame (f)
FRAME_PTR f;
{
XftDraw *xft_draw = font_get_frame_data (f, &xftfont_driver);
XftDraw *xft_draw;
/* Don't do anything if display is dead */
if (FRAME_X_DISPLAY (f) == NULL) return 0;
xft_draw = font_get_frame_data (f, &xftfont_driver);
if (xft_draw)
{
......
......@@ -10747,6 +10747,8 @@ x_delete_terminal (struct terminal *terminal)
#endif /* ! USE_GTK */
}
/* Mark as dead. */
dpyinfo->display = NULL;
x_delete_display (dpyinfo);
UNBLOCK_INPUT;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment