mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
dtappbuilder: apply graceful degradation for font loading to avoid a
segmentation fault.
This commit is contained in:
parent
1b1078ba7d
commit
4389fdd633
1 changed files with 7 additions and 5 deletions
|
@ -1883,12 +1883,14 @@ setup_vwr_graphics(
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ui_handle->sm_font)
|
if (!ui_handle->sm_font)
|
||||||
{
|
|
||||||
ui_handle->sm_font = (XFontStruct *)XLoadQueryFont(dpy, sm_font_name);
|
ui_handle->sm_font = (XFontStruct *)XLoadQueryFont(dpy, sm_font_name);
|
||||||
|
|
||||||
|
if (!ui_handle->sm_font)
|
||||||
|
ui_handle->sm_font = (XFontStruct *)XLoadQueryFont(dpy, XmDEFAULT_FONT);
|
||||||
|
|
||||||
XSetFont(dpy, ui_handle->normal_gc, ui_handle->sm_font->fid);
|
XSetFont(dpy, ui_handle->normal_gc, ui_handle->sm_font->fid);
|
||||||
XSetFont(dpy, ui_handle->select_gc, ui_handle->sm_font->fid);
|
XSetFont(dpy, ui_handle->select_gc, ui_handle->sm_font->fid);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Free the graphics context, and fonts.
|
* Free the graphics context, and fonts.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue