Skip to content

Commit 1626918

Browse files
committed
freetype: undo changes and return the values as before
1 parent 4efd781 commit 1626918

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src_c/_freetype.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,7 +1099,7 @@ _ftfont_getname(pgFontObject *self, void *closure)
10991099
{
11001100
if (pgFont_IS_ALIVE(self)) {
11011101
const char *name = _PGFT_Font_GetName(self->freetype, self);
1102-
return PyUnicode_FromString(name ? name : "");
1102+
return name ? PyUnicode_FromString(name) : 0;
11031103
}
11041104

11051105
PyErr_SetString(PyExc_AttributeError, "<uninitialized Font object>");
@@ -1111,7 +1111,7 @@ _ftfont_getstylename(pgFontObject *self, void *closure)
11111111
{
11121112
if (pgFont_IS_ALIVE(self)) {
11131113
const char *stylename = _PGFT_Font_GetStyleName(self->freetype, self);
1114-
return PyUnicode_FromString(stylename ? stylename : "");
1114+
return stylename ? PyUnicode_FromString(stylename) : 0;
11151115
}
11161116

11171117
PyErr_SetString(PyExc_AttributeError, "<uninitialized Font object>");

0 commit comments

Comments
 (0)