Fix setting the operator name in Py operator API
authorCampbell Barton <ideasman42@gmail.com>
Wed, 4 Oct 2017 23:46:26 +0000 (10:46 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 4 Oct 2017 23:50:51 +0000 (10:50 +1100)
source/blender/python/intern/bpy_operator.c

index bd3e5736c6c14e248792ca54a40558912f40d260..c1fcb0792af3cb4303646a6d0ed06751c55b0e8d 100644 (file)
@@ -450,7 +450,7 @@ static PyObject *pyop_getinstance(PyObject *UNUSED(self), PyObject *value)
        op = PyMem_MALLOC(sizeof(wmOperator));
        memset(op, 0, sizeof(wmOperator));
 #endif
-       BLI_strncpy(op->idname, op->idname, sizeof(op->idname)); /* in case its needed */
+       BLI_strncpy(op->idname, ot->idname, sizeof(op->idname)); /* in case its needed */
        op->type = ot;
 
        RNA_pointer_create(NULL, &RNA_Operator, op, &ptr);