File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff 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>" );
You can’t perform that action at this time.
0 commit comments