Mercurial > hg > xemacs-beta
diff src/glyphs-x.c @ 940:79fb6b9e9f76
[xemacs-hg @ 2002-07-31 10:23:28 by adrian]
[S] [PATCH] xemacs-21.5: Fix for xbm crash
-------------------- ChangeLog entries follow: --------------------
src/ChangeLog addition:
2002-07-29 Sean MacLennan <seanm@seanm.ca>
* glyphs-x.c (x_locate_pixmap_file): Test path not to be 0, before
using it.
author | adrian |
---|---|
date | Wed, 31 Jul 2002 10:23:39 +0000 |
parents | 44e6e64b1cf2 |
children | 184461bc8de4 |
line wrap: on
line diff
--- a/src/glyphs-x.c Wed Jul 31 07:23:39 2002 +0000 +++ b/src/glyphs-x.c Wed Jul 31 10:23:39 2002 +0000 @@ -588,20 +588,23 @@ #ifdef USE_XBMLANGPATH { Ibyte *path = egetenv ("XBMLANGPATH"); - Extbyte *pathext; - SubstitutionRec subs[1]; - subs[0].match = 'B'; - LISP_STRING_TO_EXTERNAL (name, subs[0].substitution, Qfile_name); - C_STRING_TO_EXTERNAL (path, pathext, Qfile_name); - /* #### Motif uses a big hairy default if $XBMLANGPATH isn't set. - We don't. If you want it used, set it. */ - if (pathext && - (pathext = XtResolvePathname (display, "bitmaps", 0, 0, pathext, - subs, XtNumber (subs), 0))) + if (path) { - name = build_ext_string (pathext, Qfile_name); - XtFree (pathext); - return (name); + Extbyte *pathext; + SubstitutionRec subs[1]; + subs[0].match = 'B'; + LISP_STRING_TO_EXTERNAL (name, subs[0].substitution, Qfile_name); + C_STRING_TO_EXTERNAL (path, pathext, Qfile_name); + /* #### Motif uses a big hairy default if $XBMLANGPATH isn't set. + We don't. If you want it used, set it. */ + if (pathext && + (pathext = XtResolvePathname (display, "bitmaps", 0, 0, pathext, + subs, XtNumber (subs), 0))) + { + name = build_ext_string (pathext, Qfile_name); + XtFree (pathext); + return (name); + } } } #endif