Blob Blame History Raw
diff -r -U3 blender-2.79b-orig/source/blender/python/intern/bpy_rna.c blender-2.79b/source/blender/python/intern/bpy_rna.c
--- blender-2.79b-orig/source/blender/python/intern/bpy_rna.c	2018-03-23 16:22:25.000000000 +0100
+++ blender-2.79b/source/blender/python/intern/bpy_rna.c	2018-11-02 14:15:34.311361383 +0100
@@ -7389,6 +7389,7 @@
 		item = PyObject_GetAttrString(py_class, identifier);
 
 		if (item == NULL) {
+			PyErr_Clear();
 			/* Sneaky workaround to use the class name as the bl_idname */
 
 #define     BPY_REPLACEMENT_STRING(rna_attr, py_attr)                         \
@@ -7418,8 +7419,9 @@
 				             class_type, py_class_name, identifier);
 				return -1;
 			}
-
-			PyErr_Clear();
+			else {
+				PyErr_Clear();
+			}
 		}
 		else {
 			if (pyrna_py_to_prop(dummyptr, prop, NULL, item, "validating class:") != 0) {