[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26573] trunk/blender/source/blender/ makesrna/intern/rna_wm_api.c: bugfix [#20909] (2.5) crash when clicking the arrow-restore button in keymap editor

Campbell Barton ideasman42 at gmail.com
Wed Feb 3 11:00:43 CET 2010


Revision: 26573
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26573
Author:   campbellbarton
Date:     2010-02-03 11:00:43 +0100 (Wed, 03 Feb 2010)

Log Message:
-----------
bugfix [#20909] (2.5) crash when clicking the arrow-restore button in keymap editor

Modified Paths:
--------------
    trunk/blender/source/blender/makesrna/intern/rna_wm_api.c

Modified: trunk/blender/source/blender/makesrna/intern/rna_wm_api.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_wm_api.c	2010-02-03 09:39:46 UTC (rev 26572)
+++ trunk/blender/source/blender/makesrna/intern/rna_wm_api.c	2010-02-03 10:00:43 UTC (rev 26573)
@@ -367,6 +367,7 @@
 
 	func= RNA_def_function(srna, "item_from_id", "WM_keymap_item_find_id");
 	parm= RNA_def_property(func, "id", PROP_INT, PROP_NONE);
+	RNA_def_property_flag(parm, PROP_REQUIRED);
 	RNA_def_property_ui_text(parm, "id", "ID of the item.");
 	parm= RNA_def_pointer(func, "item", "KeyMapItem", "Item", "");
 	RNA_def_function_return(func, parm);
@@ -380,7 +381,7 @@
 	func= RNA_def_function(srna, "restore_item_to_default", "rna_keymap_restore_item_to_default");
 	RNA_def_function_flag(func, FUNC_USE_CONTEXT);
 	parm= RNA_def_pointer(func, "item", "KeyMapItem", "Item", "");
-	RNA_def_property_flag(parm, PROP_REQUIRED);
+	RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
 }
 
 void RNA_api_keymapitem(StructRNA *srna)





More information about the Bf-blender-cvs mailing list