Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
18149487
Commit
18149487
authored
Jul 09, 2003
by
Lionel Ulmer
Committed by
Alexandre Julliard
Jul 09, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not crash when trying to load bad fonts.
parent
4f196ead
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
xfont.c
graphics/x11drv/xfont.c
+12
-1
No files found.
graphics/x11drv/xfont.c
View file @
18149487
...
...
@@ -2014,6 +2014,11 @@ static void XFONT_FixupPointSize(fontInfo* fi)
*
* Build font metrics from X font
*/
static
int
XLoadQueryFont_ErrorHandler
(
Display
*
dpy
,
XErrorEvent
*
event
,
void
*
arg
)
{
return
1
;
}
static
int
XFONT_BuildMetrics
(
char
**
x_pattern
,
int
res
,
unsigned
x_checksum
,
int
x_count
)
{
int
i
;
...
...
@@ -2115,7 +2120,13 @@ static int XFONT_BuildMetrics(char** x_pattern, int res, unsigned x_checksum, in
}
else
lpstr
=
x_pattern
[
i
];
if
(
(
x_fs
=
TSXLoadQueryFont
(
gdi_display
,
lpstr
))
)
/* X11 may return an error on some bad fonts... So be prepared to handle these. */
wine_tsx11_lock
();
X11DRV_expect_error
(
gdi_display
,
XLoadQueryFont_ErrorHandler
,
NULL
);
x_fs
=
XLoadQueryFont
(
gdi_display
,
lpstr
);
if
(
X11DRV_check_error
())
x_fs
=
0
;
wine_tsx11_unlock
();
if
(
x_fs
!=
0
)
{
XFONT_SetFontMetric
(
fi
,
fr
,
x_fs
);
TSXFreeFont
(
gdi_display
,
x_fs
);
...
...
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