diff options
Diffstat (limited to 'source/blender/draw/intern/draw_armature.c')
-rw-r--r-- | source/blender/draw/intern/draw_armature.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/source/blender/draw/intern/draw_armature.c b/source/blender/draw/intern/draw_armature.c index 720740ef84b..fcd6e003df1 100644 --- a/source/blender/draw/intern/draw_armature.c +++ b/source/blender/draw/intern/draw_armature.c @@ -625,7 +625,6 @@ static const float *get_bone_wire_color( static void pchan_draw_data_init(bPoseChannel *pchan) { - if (pchan->draw_data != NULL) { if (pchan->draw_data->bbone_matrix_len != pchan->bone->segments) { MEM_SAFE_FREE(pchan->draw_data); @@ -633,9 +632,7 @@ static void pchan_draw_data_init(bPoseChannel *pchan) } if (pchan->draw_data == NULL) { - bPoseChannelDrawData *draw_data; - /* We just allocate max allowed segcount, we can always refine this later if really needed. */ - pchan->draw_data = MEM_mallocN(sizeof(*draw_data) + sizeof(Mat4) * pchan->bone->segments, __func__); + pchan->draw_data = MEM_mallocN(sizeof(*pchan->draw_data) + sizeof(Mat4) * pchan->bone->segments, __func__); pchan->draw_data->bbone_matrix_len = pchan->bone->segments; } } |