Fix setting the operator name in Py operator API
[blender-staging.git] / 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);