[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [21147] branches/soc-2009-aligorith/source /blender/editors/space_nla/nla_buttons.c: NLA SoC: Quick crash fix

Joshua Leung aligorith at gmail.com
Thu Jun 25 07:05:36 CEST 2009


Revision: 21147
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21147
Author:   aligorith
Date:     2009-06-25 07:05:35 +0200 (Thu, 25 Jun 2009)

Log Message:
-----------
NLA SoC: Quick crash fix

Pointer for accessing settings of active NLA-strip was not getting set. The code for this was accidentally removed during an earlier commit to clean up the poll callbacks here.

Modified Paths:
--------------
    branches/soc-2009-aligorith/source/blender/editors/space_nla/nla_buttons.c

Modified: branches/soc-2009-aligorith/source/blender/editors/space_nla/nla_buttons.c
===================================================================
--- branches/soc-2009-aligorith/source/blender/editors/space_nla/nla_buttons.c	2009-06-25 04:33:21 UTC (rev 21146)
+++ branches/soc-2009-aligorith/source/blender/editors/space_nla/nla_buttons.c	2009-06-25 05:05:35 UTC (rev 21147)
@@ -207,6 +207,9 @@
 	uiLayout *column, *row, *subcol;
 	uiBlock *block;
 	
+	if (!nla_panel_context(C, NULL, &strip_ptr))
+		return;
+	
 	block= uiLayoutGetBlock(layout);
 	uiBlockSetHandleFunc(block, do_nla_region_buttons, NULL);
 	
@@ -259,10 +262,6 @@
 	if (!nla_panel_context(C, NULL, &strip_ptr))
 		return;
 	
-	// XXX FIXME: move this check into a poll callback
-	if (RNA_enum_get(&strip_ptr, "type") != NLASTRIP_TYPE_CLIP)
-		return;
-		
 	block= uiLayoutGetBlock(layout);
 	uiBlockSetHandleFunc(block, do_nla_region_buttons, NULL);
 		





More information about the Bf-blender-cvs mailing list