src/rl_addons/renderPM/_renderPM.c
changeset 4737 e39e4741759a
parent 4668 f8d6dc8f07fc
child 4740 5e0221f70afc
--- a/src/rl_addons/renderPM/_renderPM.c	Thu Sep 08 10:12:14 2022 +0100
+++ b/src/rl_addons/renderPM/_renderPM.c	Mon Sep 12 09:33:45 2022 +0100
@@ -19,7 +19,7 @@
 #endif
 
 
-#define VERSION "4.01"
+#define VERSION "4.02"
 #define MODULENAME "_renderPM"
 #define PyInt_FromLong	PyLong_FromLong
 #define staticforward static
@@ -174,11 +174,11 @@
 		}
 
 	ft_face = PyObject_NEW(py_FT_FontObject, &py_FT_Font_Type);
-	ft_face->face = NULL;
 	if(!ft_face){
 		PyErr_Format(PyExc_MemoryError, "Cannot allocate ft_face for TTFont %s", fontName);
 		goto RET;
 		}
+	ft_face->face = NULL;
 	face = PyObject_GetAttrString(font,"face");
 	if(!face) goto RET;
 	_data = PyObject_GetAttrString(face,"_ttf_data");