Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
6938a98a
Commit
6938a98a
authored
May 29, 2012
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
freetype: fixed crash within ATS when looking for non-existing font families
parent
f8aa3950
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
modules/text_renderer/freetype.c
modules/text_renderer/freetype.c
+9
-3
No files found.
modules/text_renderer/freetype.c
View file @
6938a98a
...
...
@@ -722,14 +722,15 @@ static char* MacLegacy_Select( filter_t *p_filter, const char* psz_fontname,
*
i_idx
=
0
;
msg_Dbg
(
p_filter
,
"looking for %s"
,
psz_fontname
);
cf_fontName
=
CFStringCreateWithCString
(
NULL
,
psz_fontname
,
kCFStringEncodingUTF8
);
cf_fontName
=
CFStringCreateWithCString
(
kCFAllocatorDefault
,
psz_fontname
,
kCFStringEncodingUTF8
);
ats_font_id
=
ATSFontFindFromName
(
cf_fontName
,
kATSOptionFlagsIncludeDisabledMask
);
CFRelease
(
cf_fontName
);
if
(
ats_font_id
==
0
||
ats_font_id
==
0
xFFFFFFFFUL
)
if
(
ats_font_id
==
0xFFFFFFFFUL
)
{
msg_Dbg
(
p_filter
,
"ATS couldn't find %s by name, checking family"
,
psz_fontname
);
ats_font_id
=
ATSFontFamilyFindFromName
(
cf_fontName
,
kATSOptionFlags
IncludeDisabledMask
);
ats_font_id
=
ATSFontFamilyFindFromName
(
cf_fontName
,
kATSOptionFlags
Default
);
if
(
ats_font_id
==
0
||
ats_font_id
==
0xFFFFFFFFUL
)
{
...
...
@@ -737,6 +738,11 @@ static char* MacLegacy_Select( filter_t *p_filter, const char* psz_fontname,
return
NULL
;
}
}
else
if
(
ats_font_id
==
0
)
{
msg_Err
(
p_filter
,
"ATS couldn't find %s by name, won't check family"
,
psz_fontname
);
return
NULL
;
}
if
(
noErr
!=
ATSFontGetFileReference
(
ats_font_id
,
&
ref
)
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment