Small fix to previous commit: temp buffer for translation context needs to be initial...
authorBastien Montagne <montagne29@wanadoo.fr>
Fri, 15 Mar 2013 15:12:46 +0000 (15:12 +0000)
committerBastien Montagne <montagne29@wanadoo.fr>
Fri, 15 Mar 2013 15:12:46 +0000 (15:12 +0000)
source/blender/makesrna/intern/rna_wm.c

index 0dd95d17260e240769de3536903163858fe90f2f..f42197ec0a957753cec579711561548323e654ba 100644 (file)
@@ -1070,7 +1070,9 @@ static StructRNA *rna_Operator_register(Main *bmain, ReportList *reports, void *
        RNA_pointer_create(NULL, &RNA_Operator, &dummyop, &dummyotr);
 
        /* clear in case they are left unset */
-       _operator_idname[0] = _operator_name[0] = _operator_descr[0] = _operator_ctxt[0] = '\0';
+       _operator_idname[0] = _operator_name[0] = _operator_descr[0] = '\0';
+       /* We have to set default op context! */
+       strcpy(_operator_ctxt, BLF_I18NCONTEXT_OPERATOR_DEFAULT);
 
        /* validate the python class */
        if (validate(&dummyotr, data, have_function) != 0)
@@ -1194,6 +1196,11 @@ static StructRNA *rna_MacroOperator_register(Main *bmain, ReportList *reports, v
        dummyot.translation_context = _operator_ctxt; /* only assigne the pointer, string is NULL'd */
        RNA_pointer_create(NULL, &RNA_Macro, &dummyop, &dummyotr);
 
+       /* clear in case they are left unset */
+       _operator_idname[0] = _operator_name[0] = _operator_descr[0] = '\0';
+       /* We have to set default op context! */
+       strcpy(_operator_ctxt, BLF_I18NCONTEXT_OPERATOR_DEFAULT);
+
        /* validate the python class */
        if (validate(&dummyotr, data, have_function) != 0)
                return NULL;