Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-08-05 16:46:49 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-08-05 16:47:13 +0300
commit5e050918d84b20635b58be2d0d1fee7e1f24236c (patch)
treefed1a6a2b4f850141ec8dda9ece97b8fe1df84c0 /source/blender/editors/space_node/node_relationships.c
parent11bfeb45ce1b1cdb95e6cd4a4ec4efae2b5184e0 (diff)
Fix dereference before NULL check
Diffstat (limited to 'source/blender/editors/space_node/node_relationships.c')
-rw-r--r--source/blender/editors/space_node/node_relationships.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_node/node_relationships.c b/source/blender/editors/space_node/node_relationships.c
index 21b56114172..8b74c6c4808 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);