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:
authorBastien Montagne <montagne29@wanadoo.fr>2016-08-16 19:19:52 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-08-16 19:19:52 +0300
commit1e4e140efb43d05ff3361694f429338d2b90f140 (patch)
treeb57921ce1c2ba9d2c48330c7696de57820dcbddf /source/blender/editors/animation
parent64a6a86d57ee0c8810b7738bc42950c336d82952 (diff)
More fixes from coverity report.
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index 3085e383909..d727ea0a957 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -3901,7 +3901,12 @@ static void achannel_setting_flush_widget_cb(bContext *C, void *ale_npoin, void
/* send notifiers before doing anything else... */
WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
-
+
+ /* verify that we have a channel to operate on. */
+ if (!ale_setting) {
+ return;
+ }
+
if (ale_setting->type == ANIMTYPE_GPLAYER)
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA, NULL);
@@ -3909,17 +3914,13 @@ static void achannel_setting_flush_widget_cb(bContext *C, void *ale_npoin, void
if (ANIM_animdata_get_context(C, &ac) == 0)
return;
- /* verify that we have a channel to operate on, and that it has all we need */
- if (ale_setting) {
- /* check if the setting is on... */
- on = ANIM_channel_setting_get(&ac, ale_setting, setting);
-
- /* on == -1 means setting not found... */
- if (on == -1)
- return;
- }
- else
+ /* check if the setting is on... */
+ on = ANIM_channel_setting_get(&ac, ale_setting, setting);
+
+ /* on == -1 means setting not found... */
+ if (on == -1) {
return;
+ }
/* get all channels that can possibly be chosen - but ignore hierarchy */
filter = ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_CHANNELS;