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:
Diffstat (limited to 'source/blender/blenkernel/intern/linestyle.c')
-rw-r--r--source/blender/blenkernel/intern/linestyle.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/linestyle.c b/source/blender/blenkernel/intern/linestyle.c
index d244e9d79d2..1a5760b049c 100644
--- a/source/blender/blenkernel/intern/linestyle.c
+++ b/source/blender/blenkernel/intern/linestyle.c
@@ -280,6 +280,9 @@ LineStyleModifier *BKE_linestyle_color_modifier_add(FreestyleLineStyle *linestyl
LineStyleModifier *m;
m = alloc_color_modifier(name, type);
+ if (UNLIKELY(m == NULL)) {
+ return NULL;
+ }
m->blend = MA_RAMP_BLEND;
switch (type) {
@@ -314,6 +317,9 @@ LineStyleModifier *BKE_linestyle_color_modifier_copy(FreestyleLineStyle *linesty
LineStyleModifier *new_m;
new_m = alloc_color_modifier(m->name, m->type);
+ if (UNLIKELY(new_m == NULL)) {
+ return NULL;
+ }
new_m->influence = m->influence;
new_m->flags = m->flags;
new_m->blend = m->blend;