[Bf-blender-cvs] [5e05091] master: Fix dereference before NULL check

Campbell Barton noreply at git.blender.org
Wed Aug 5 15:55:23 CEST 2015


Commit: 5e050918d84b20635b58be2d0d1fee7e1f24236c
Author: Campbell Barton
Date:   Wed Aug 5 23:46:49 2015 +1000
Branches: master
https://developer.blender.org/rB5e050918d84b20635b58be2d0d1fee7e1f24236c

Fix dereference before NULL check

===================================================================

M	source/blender/editors/space_node/node_relationships.c

===================================================================

diff --git a/source/blender/editors/space_node/node_relationships.c b/source/blender/editors/space_node/node_relationships.c
index 21b5611..8b74c6c 100644
--- a/source/blender/editors/space_node/node_relationships.c
+++ b/source/blender/editors/space_node/node_relationships.c
@@ -1633,12 +1633,13 @@ static int node_insert_offset_modal(bContext *C, wmOperator *UNUSED(op), const w
 	SpaceNode *snode = CTX_wm_space_node(C);
 	NodeInsertOfsData *iofsd = snode->iofsd;
 	bNode *node;
-	const float duration = (float)iofsd->anim_timer->duration;
+	float duration;
 
 	if (!snode || event->type != TIMER || iofsd->anim_timer != event->customdata)
 		return OPERATOR_PASS_THROUGH;
 
 	/* end timer + free insert offset data */
+	duration = (float)iofsd->anim_timer->duration;
 	if (duration > NODE_INSOFS_ANIM_DURATION) {
 		WM_event_remove_timer(CTX_wm_manager(C), NULL, iofsd->anim_timer);




More information about the Bf-blender-cvs mailing list