@@ -832,6 +832,10 @@ font_getter_style_name(PyObject *self, void *closure)
832832static int
833833font_setter_outline (PyObject * self , PyObject * value , void * closure )
834834{
835+ if (!PgFont_GenerationCheck (self )) {
836+ RAISE_FONT_QUIT_ERROR_RETURN (-1 );
837+ }
838+
835839 TTF_Font * font = PyFont_AsFont (self );
836840 int val ;
837841
@@ -846,6 +850,10 @@ font_setter_outline(PyObject *self, PyObject *value, void *closure)
846850static PyObject *
847851font_getter_outline (PyObject * self , void * closure )
848852{
853+ if (!PgFont_GenerationCheck (self )) {
854+ return RAISE_FONT_QUIT_ERROR ();
855+ }
856+
849857 return PyLong_FromLong (TTF_GetFontOutline (PyFont_AsFont (self )));
850858}
851859
@@ -1079,7 +1087,7 @@ static PyGetSetDef font_getsets[] = {
10791087 {"point_size" , (getter )font_getter_point_size ,
10801088 (setter )font_setter_point_size , DOC_FONT_FONT_POINTSIZE , NULL },
10811089 {"outline" , (getter )font_getter_outline , (setter )font_setter_outline ,
1082- "TODO" , NULL },
1090+ DOC_FONT_FONT_OUTLINE , NULL },
10831091 {NULL , NULL , NULL , NULL , NULL }};
10841092
10851093static PyMethodDef font_methods [] = {
0 commit comments