diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2013-03-27 02:07:14 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2013-03-27 02:11:02 +0100 |
commit | a480a76fad23546be630650aed6b84bda7872f46 (patch) | |
tree | e442754a5dc3c81e84bf9a3f0c752ddad7c6c33f /kdeui/kactionclasses.cpp | |
parent | 9a034a7c47cc503777d92c0a012e4d566e7cdb80 (diff) | |
download | tdelibs-a480a76fad23546be630650aed6b84bda7872f46.tar.gz tdelibs-a480a76fad23546be630650aed6b84bda7872f46.zip |
Fix crashes with fontconfig 2.9.0 and newer
This resolves Bug 1422
(cherry picked from commit 513dce7c027b6e60627d4ff6d97bc4e9fffcb060)
Diffstat (limited to 'kdeui/kactionclasses.cpp')
-rw-r--r-- | kdeui/kactionclasses.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kdeui/kactionclasses.cpp b/kdeui/kactionclasses.cpp index 9e2241408..e08e086c4 100644 --- a/kdeui/kactionclasses.cpp +++ b/kdeui/kactionclasses.cpp @@ -1506,12 +1506,13 @@ void KFontAction::setFont( const TQString &family ) // check again to solve an alias FcPattern *pattern = NULL; FcConfig *config = NULL; + FcResult result; TQString realFamily; TQRegExp regExp("[-:]"); pattern = FcNameParse( (unsigned char*) family.ascii() ); FcDefaultSubstitute(pattern); FcConfigSubstitute (config, pattern, FcMatchPattern); - pattern = FcFontMatch(NULL, pattern, NULL); + pattern = FcFontMatch(NULL, pattern, &result); realFamily = (char*)FcNameUnparse(pattern); realFamily.remove(realFamily.find(regExp), realFamily.length()); |