summaryrefslogtreecommitdiff
path: root/src/cairo-ft-font.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2009-04-16 12:59:36 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2009-04-20 10:21:23 +0100
commit50302f156dfba4dcb3639843d7eda819f2c6797c (patch)
tree0dc6d7208e1b1fd3e78ca1baef1a2015cfc0a246 /src/cairo-ft-font.c
parent8bf109bd2a9c9bf755671185733def898a4f96f2 (diff)
[ft] Check (correctly!) for pattern duplication failure.
Check the return from FcPatternDuplicate() for allocation failure (and not the original pattern)!
Diffstat (limited to 'src/cairo-ft-font.c')
-rw-r--r--src/cairo-ft-font.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
index 3cfe344a..6e9d5f9b 100644
--- a/src/cairo-ft-font.c
+++ b/src/cairo-ft-font.c
@@ -2352,7 +2352,7 @@ _cairo_ft_font_face_create_for_pattern (FcPattern *pattern,
font_face->next = NULL;
font_face->pattern = FcPatternDuplicate (pattern);
- if (unlikely (pattern == NULL)) {
+ if (unlikely (font_face->pattern == NULL)) {
free (font_face);
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
}