[Bf-blender-cvs] [05e5a72af54] greasepencil-object: Fix segment fault for modifiers with COW enabled
Antonio Vazquez
noreply at git.blender.org
Wed May 9 16:23:41 CEST 2018
Commit: 05e5a72af54daaf995bfe61d36bcb95fd7136f65
Author: Antonio Vazquez
Date: Wed May 9 16:23:35 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB05e5a72af54daaf995bfe61d36bcb95fd7136f65
Fix segment fault for modifiers with COW enabled
The curves in copyData was freed, but the pointer was not set to NULL.
===================================================================
M source/blender/modifiers/intern/MOD_gpencilhook.c
M source/blender/modifiers/intern/MOD_gpencilthick.c
===================================================================
diff --git a/source/blender/modifiers/intern/MOD_gpencilhook.c b/source/blender/modifiers/intern/MOD_gpencilhook.c
index eedda9a838b..fdcca19016b 100644
--- a/source/blender/modifiers/intern/MOD_gpencilhook.c
+++ b/source/blender/modifiers/intern/MOD_gpencilhook.c
@@ -95,6 +95,7 @@ static void copyData(const ModifierData *md, ModifierData *target)
if (tgmd->curfalloff != NULL) {
curvemapping_free(tgmd->curfalloff);
+ tgmd->curfalloff = NULL;
}
modifier_copyData_generic(md, target);
diff --git a/source/blender/modifiers/intern/MOD_gpencilthick.c b/source/blender/modifiers/intern/MOD_gpencilthick.c
index 5fe4210160d..1c989986497 100644
--- a/source/blender/modifiers/intern/MOD_gpencilthick.c
+++ b/source/blender/modifiers/intern/MOD_gpencilthick.c
@@ -75,6 +75,7 @@ static void copyData(const ModifierData *md, ModifierData *target)
if (tgmd->cur_thickness != NULL) {
curvemapping_free(tgmd->cur_thickness);
+ tgmd->cur_thickness = NULL;
}
modifier_copyData_generic(md, target);
More information about the Bf-blender-cvs
mailing list