[Bf-blender-cvs] [82efcfc1885] blender-v3.0-release: Correct assert checking gizmo type

Campbell Barton noreply at git.blender.org
Fri Nov 5 06:04:18 CET 2021


Commit: 82efcfc1885d048c0ec7b5eea7c0a2c1df7940c5
Author: Campbell Barton
Date:   Fri Nov 5 15:49:04 2021 +1100
Branches: blender-v3.0-release
https://developer.blender.org/rB82efcfc1885d048c0ec7b5eea7c0a2c1df7940c5

Correct assert checking gizmo type

===================================================================

M	source/blender/python/intern/bpy_rna_gizmo.c

===================================================================

diff --git a/source/blender/python/intern/bpy_rna_gizmo.c b/source/blender/python/intern/bpy_rna_gizmo.c
index adae68bd7b4..e4fb5b33e97 100644
--- a/source/blender/python/intern/bpy_rna_gizmo.c
+++ b/source/blender/python/intern/bpy_rna_gizmo.c
@@ -63,7 +63,7 @@ static int py_rna_gizmo_parse(PyObject *o, void *p)
 {
   /* No type checking (this is `self` not a user defined argument). */
   BLI_assert(BPy_StructRNA_Check(o));
-  BLI_assert(((const BPy_StructRNA *)o)->ptr.type == &RNA_Gizmo);
+  BLI_assert(RNA_struct_is_a(((const BPy_StructRNA *)o)->ptr.type, &RNA_Gizmo));
 
   wmGizmo **gz_p = p;
   *gz_p = ((const BPy_StructRNA *)o)->ptr.data;



More information about the Bf-blender-cvs mailing list