@@ -832,6 +832,10 @@ font_getter_style_name(PyObject *self, void *closure)
832
832
static int
833
833
font_setter_outline (PyObject * self , PyObject * value , void * closure )
834
834
{
835
+ if (!PgFont_GenerationCheck (self )) {
836
+ RAISE_FONT_QUIT_ERROR_RETURN (-1 );
837
+ }
838
+
835
839
TTF_Font * font = PyFont_AsFont (self );
836
840
int val ;
837
841
@@ -846,6 +850,10 @@ font_setter_outline(PyObject *self, PyObject *value, void *closure)
846
850
static PyObject *
847
851
font_getter_outline (PyObject * self , void * closure )
848
852
{
853
+ if (!PgFont_GenerationCheck (self )) {
854
+ return RAISE_FONT_QUIT_ERROR ();
855
+ }
856
+
849
857
return PyLong_FromLong (TTF_GetFontOutline (PyFont_AsFont (self )));
850
858
}
851
859
@@ -1079,7 +1087,7 @@ static PyGetSetDef font_getsets[] = {
1079
1087
{"point_size" , (getter )font_getter_point_size ,
1080
1088
(setter )font_setter_point_size , DOC_FONT_FONT_POINTSIZE , NULL },
1081
1089
{"outline" , (getter )font_getter_outline , (setter )font_setter_outline ,
1082
- "TODO" , NULL },
1090
+ DOC_FONT_FONT_OUTLINE , NULL },
1083
1091
{NULL , NULL , NULL , NULL , NULL }};
1084
1092
1085
1093
static PyMethodDef font_methods [] = {
0 commit comments