diff options
| author | Andreas Schwab | 2008-06-15 10:13:24 +0000 |
|---|---|---|
| committer | Andreas Schwab | 2008-06-15 10:13:24 +0000 |
| commit | 3306c6dcd73a6329e05aa46cce8cac86651b109b (patch) | |
| tree | e17ce389a1f36e9b991527fd3f53562160d716f3 /src | |
| parent | 390b0feef55157621ea195daed474dca99fd74a0 (diff) | |
| download | emacs-3306c6dcd73a6329e05aa46cce8cac86651b109b.tar.gz emacs-3306c6dcd73a6329e05aa46cce8cac86651b109b.zip | |
(font_update_drivers): Fix crash when no drivers match.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/font.c | 12 |
2 files changed, 9 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 8e24f83b15b..f3a7ec0468e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2008-06-15 Andreas Schwab <schwab@suse.de> | ||
| 2 | |||
| 3 | * font.c (font_update_drivers): Fix crash when no drivers match. | ||
| 4 | |||
| 1 | 2008-06-15 Stefan Monnier <monnier@iro.umontreal.ca> | 5 | 2008-06-15 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 6 | ||
| 3 | * xfns.c (Fx_create_frame): internal-border-width default to 0 for Gtk. | 7 | * xfns.c (Fx_create_frame): internal-border-width default to 0 for Gtk. |
diff --git a/src/font.c b/src/font.c index ead3a6a59a8..9667e031bcf 100644 --- a/src/font.c +++ b/src/font.c | |||
| @@ -3272,7 +3272,7 @@ font_update_drivers (f, new_drivers) | |||
| 3272 | if (! EQ (new_drivers, Qt)) | 3272 | if (! EQ (new_drivers, Qt)) |
| 3273 | { | 3273 | { |
| 3274 | /* Re-order the driver list according to new_drivers. */ | 3274 | /* Re-order the driver list according to new_drivers. */ |
| 3275 | struct font_driver_list **list_table, *list; | 3275 | struct font_driver_list **list_table, **next; |
| 3276 | Lisp_Object tail; | 3276 | Lisp_Object tail; |
| 3277 | int i; | 3277 | int i; |
| 3278 | 3278 | ||
| @@ -3290,15 +3290,13 @@ font_update_drivers (f, new_drivers) | |||
| 3290 | list_table[i] = list; | 3290 | list_table[i] = list; |
| 3291 | list_table[i] = NULL; | 3291 | list_table[i] = NULL; |
| 3292 | 3292 | ||
| 3293 | f->font_driver_list = list = NULL; | 3293 | next = &f->font_driver_list; |
| 3294 | for (i = 0; list_table[i]; i++) | 3294 | for (i = 0; list_table[i]; i++) |
| 3295 | { | 3295 | { |
| 3296 | if (list) | 3296 | *next = list_table[i]; |
| 3297 | list->next = list_table[i], list = list->next; | 3297 | next = &(*next)->next; |
| 3298 | else | ||
| 3299 | f->font_driver_list = list = list_table[i]; | ||
| 3300 | } | 3298 | } |
| 3301 | list->next = NULL; | 3299 | *next = NULL; |
| 3302 | } | 3300 | } |
| 3303 | 3301 | ||
| 3304 | for (list = f->font_driver_list; list; list = list->next) | 3302 | for (list = f->font_driver_list; list; list = list->next) |