# HG changeset patch # User Kim F. Storm # Date 1152022476 0 # Node ID 9ffb5cb61a668dd3c9b3af43ec94eba2a31c8aa4 # Parent 5194c45b49baedf26b736f2784dcec27de248e10 (x_delete_display): Don't free or derefence NULL pointers. diff -r 5194c45b49ba -r 9ffb5cb61a66 src/xterm.c --- a/src/xterm.c Tue Jul 04 14:14:13 2006 +0000 +++ b/src/xterm.c Tue Jul 04 14:14:36 2006 +0000 @@ -10772,12 +10772,16 @@ xfree (dpyinfo->font_table[i].name); } - if (dpyinfo->font_table->font_encoder) - xfree (dpyinfo->font_table->font_encoder); - - xfree (dpyinfo->font_table); - xfree (dpyinfo->x_id_name); - xfree (dpyinfo->color_cells); + if (dpyinfo->font_table) + { + if (dpyinfo->font_table->font_encoder) + xfree (dpyinfo->font_table->font_encoder); + xfree (dpyinfo->font_table); + } + if (dpyinfo->x_id_name) + xfree (dpyinfo->x_id_name); + if (dpyinfo->color_cells) + xfree (dpyinfo->color_cells); xfree (dpyinfo); }