Mercurial > hg > xemacs-beta
comparison src/font-mgr.h @ 5818:15b0715c204d
Avoid passing patterns to with charset property to FcNameUnparse.
Prevents crash reported by Raymond Toy.
author | Stephen J. Turnbull <stephen@xemacs.org> |
---|---|
date | Sat, 18 Oct 2014 21:20:42 +0900 |
parents | 308d34e9f07d |
children | 6928877dbc26 |
comparison
equal
deleted
inserted
replaced
5817:a58070ee1f31 | 5818:15b0715c204d |
---|---|
142 and must be internal format (eg, pure ASCII) | 142 and must be internal format (eg, pure ASCII) |
143 PATTERN is an FcPattern *. */ | 143 PATTERN is an FcPattern *. */ |
144 #define PRINT_XFT_PATTERN(level,format,pattern) \ | 144 #define PRINT_XFT_PATTERN(level,format,pattern) \ |
145 do { \ | 145 do { \ |
146 DECLARE_EISTRING (eistrpxft_name); \ | 146 DECLARE_EISTRING (eistrpxft_name); \ |
147 Extbyte *name = (Extbyte *) FcNameUnparse (pattern); \ | 147 Extbyte *name; \ |
148 \ | 148 FcPatternDel(pattern, FC_CHARSET); \ |
149 name = (Extbyte *) FcNameUnparse (pattern); \ | |
149 eicpy_ext(eistrpxft_name, \ | 150 eicpy_ext(eistrpxft_name, \ |
150 name ? name : "FONT WITH NULL NAME", \ | 151 name ? name : "FONT WITH NULL NAME", \ |
151 Qfc_font_name_encoding); \ | 152 Qfc_font_name_encoding); \ |
152 DEBUG_XFT1 (level, format, eidata(eistrpxft_name)); \ | 153 DEBUG_XFT1 (level, format, eidata(eistrpxft_name)); \ |
153 free (name); \ | 154 free (name); \ |