comparison src/objects-x.c @ 3286:b3ab8c197518

[xemacs-hg @ 2006-03-17 14:30:43 by stephent] eliminate bogus pointer to nowhere in x_font_instance_truename <874q1xgn5d.fsf@tleepslib.sk.tsukuba.ac.jp>
author stephent
date Fri, 17 Mar 2006 14:30:45 +0000
parents 948bd302ca41
children 15fb91e3a115
comparison
equal deleted inserted replaced
3285:aac38be9d24e 3286:b3ab8c197518
792 x_font_instance_truename (Lisp_Font_Instance *f, Error_Behavior errb) 792 x_font_instance_truename (Lisp_Font_Instance *f, Error_Behavior errb)
793 { 793 {
794 struct device *d = XDEVICE (f->device); 794 struct device *d = XDEVICE (f->device);
795 Display *dpy = DEVICE_X_DISPLAY (d); 795 Display *dpy = DEVICE_X_DISPLAY (d);
796 Extbyte *nameext; 796 Extbyte *nameext;
797 char* xlfd;
798 797
799 /* #### restructure this so that we return a valid truename at the end, 798 /* #### restructure this so that we return a valid truename at the end,
800 and otherwise only return when we return something desperate that 799 and otherwise only return when we return something desperate that
801 doesn't get stored for future use. */ 800 doesn't get stored for future use. */
802 801
825 824
826 /* OK, fall back to core font. */ 825 /* OK, fall back to core font. */
827 if (NILP (FONT_INSTANCE_TRUENAME (f)) 826 if (NILP (FONT_INSTANCE_TRUENAME (f))
828 && FONT_INSTANCE_X_FONT (f)) 827 && FONT_INSTANCE_X_FONT (f))
829 { 828 {
830 nameext = &xlfd[0]; 829 nameext = NEW_LISP_STRING_TO_EXTERNAL (f->name, Qx_font_name_encoding);
831 LISP_STRING_TO_EXTERNAL (f->name, nameext, Qx_font_name_encoding);
832
833 FONT_INSTANCE_TRUENAME (f) = 830 FONT_INSTANCE_TRUENAME (f) =
834 x_font_truename (dpy, nameext, FONT_INSTANCE_X_FONT (f)); 831 x_font_truename (dpy, nameext, FONT_INSTANCE_X_FONT (f));
835 } 832 }
836 833
837 if (NILP (FONT_INSTANCE_TRUENAME (f))) 834 if (NILP (FONT_INSTANCE_TRUENAME (f)))