Fix setting the operator name in Py operator API

This commit is contained in:
Campbell Barton 2017-10-05 10:46:26 +11:00 committed by Bastien Montagne
parent 9f032c3867
commit 8c9bebfe28
1 changed files with 1 additions and 1 deletions

View 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);