bugfix [#20721] Reloading scripts crashes Blender (own todo)
made an incorrect assumption that ot->srna and the srna for the registered operators type are the same. caused reload to crash.
This commit is contained in:
		@@ -605,7 +605,8 @@ static void rna_Operator_unregister(const bContext *C, StructRNA *type)
 | 
			
		||||
	WM_operatortype_remove(ot->idname);
 | 
			
		||||
	MEM_freeN(idname);
 | 
			
		||||
 | 
			
		||||
	// RNA_struct_free(&BLENDER_RNA, type); // WM_operatortype_remove calls this
 | 
			
		||||
	/* not to be confused with the RNA_struct_free that WM_operatortype_remove calls, they are 2 different srna's */
 | 
			
		||||
	RNA_struct_free(&BLENDER_RNA, type);
 | 
			
		||||
 | 
			
		||||
	/* update while blender is running */
 | 
			
		||||
	if(C)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user