mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed a crash if no fonts are found
This commit is contained in:
parent
7823790beb
commit
c01249ffe5
@ -744,6 +744,7 @@ Georg Hitsch <georg@hitsch.at>
|
|||||||
Clemens Kirchgatterer <clemens@thf.ath.cx>
|
Clemens Kirchgatterer <clemens@thf.ath.cx>
|
||||||
for suggesting to change source directory name for plugins from 'SRC' to 'src'
|
for suggesting to change source directory name for plugins from 'SRC' to 'src'
|
||||||
for reporting a problem with user defined CFLAGS in libdtv/libvdr/Makefile
|
for reporting a problem with user defined CFLAGS in libdtv/libvdr/Makefile
|
||||||
|
for suggesting an error log message if no fonts are found
|
||||||
|
|
||||||
Emil Naepflein <Emil.Naepflein@philosys.de>
|
Emil Naepflein <Emil.Naepflein@philosys.de>
|
||||||
for suggesting to take an active SVDRP connection into account when doing shutdown or
|
for suggesting to take an active SVDRP connection into account when doing shutdown or
|
||||||
@ -2231,3 +2232,6 @@ Yarema Aka Knedlyk <yupadmin@gmail.com>
|
|||||||
|
|
||||||
Lauri Nurmi <lanurmi@iki.fi>
|
Lauri Nurmi <lanurmi@iki.fi>
|
||||||
for adding a missing '.' to the date returned by DayDateTime()
|
for adding a missing '.' to the date returned by DayDateTime()
|
||||||
|
|
||||||
|
Mario Ivankovits <mario@ops.co.at>
|
||||||
|
for fixing a crash if no fonts are found
|
||||||
|
2
HISTORY
2
HISTORY
@ -5514,3 +5514,5 @@ Video Disk Recorder Revision History
|
|||||||
Stefan Huelswitt). The 'newplugin' and 'i18n-to-gettext.pl' scripts have been
|
Stefan Huelswitt). The 'newplugin' and 'i18n-to-gettext.pl' scripts have been
|
||||||
changed accordingly. Plugin authors may want to adjust the 'i18n' target
|
changed accordingly. Plugin authors may want to adjust the 'i18n' target
|
||||||
of their Makefiles.
|
of their Makefiles.
|
||||||
|
- Fixed a crash if no fonts are found (thanks to Mario Ivankovits and Clemens
|
||||||
|
Kirchgatterer).
|
||||||
|
6
font.c
6
font.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: font.c 1.21 2007/06/23 11:25:42 kls Exp $
|
* $Id: font.c 1.22 2007/11/04 11:08:12 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "font.h"
|
#include "font.h"
|
||||||
@ -395,6 +395,7 @@ cString cFont::GetFontFileName(const char *FontName)
|
|||||||
FcConfigSubstitute(NULL, pat, FcMatchPattern);
|
FcConfigSubstitute(NULL, pat, FcMatchPattern);
|
||||||
FcDefaultSubstitute(pat);
|
FcDefaultSubstitute(pat);
|
||||||
FcFontSet *fontset = FcFontSort(NULL, pat, FcFalse, NULL, NULL);
|
FcFontSet *fontset = FcFontSort(NULL, pat, FcFalse, NULL, NULL);
|
||||||
|
if (fontset) {
|
||||||
for (int i = 0; i < fontset->nfont; i++) {
|
for (int i = 0; i < fontset->nfont; i++) {
|
||||||
FcBool scalable;
|
FcBool scalable;
|
||||||
FcPatternGetBool(fontset->fonts[i], FC_SCALABLE, 0, &scalable);
|
FcPatternGetBool(fontset->fonts[i], FC_SCALABLE, 0, &scalable);
|
||||||
@ -406,6 +407,9 @@ cString cFont::GetFontFileName(const char *FontName)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
FcFontSetDestroy(fontset);
|
FcFontSetDestroy(fontset);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
esyslog("ERROR: no usable font found for '%s'", FontName);
|
||||||
FcPatternDestroy(pat);
|
FcPatternDestroy(pat);
|
||||||
free(fn);
|
free(fn);
|
||||||
FcFini();
|
FcFini();
|
||||||
|
Loading…
Reference in New Issue
Block a user