Mercurial > emacs
changeset 71610:9ffb5cb61a66
(x_delete_display): Don't free or derefence NULL pointers.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Tue, 04 Jul 2006 14:14:36 +0000 |
parents | 5194c45b49ba |
children | 94186fc5fd79 |
files | src/xterm.c |
diffstat | 1 files changed, 10 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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); }