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>2013-07-13 09:50:35 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-13 09:50:35 +0400
commitfa3699f067fa18e1f1acd5c3aaaf4fb3cc4d8050 (patch)
tree4f28de88e0e9e513479ac50705a67b83d323efae /source/blender
parenteedd5419290261b9e7a48cea61563183ff14aff0 (diff)
fix errors in code
- BKE_mball_center_median(), didn't work. - clip_refresh was removing handlers from wrong space. - new_modifier, replace strcpy with BLI_strncpy
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/linestyle.c2
-rw-r--r--source/blender/blenkernel/intern/mball.c1
-rw-r--r--source/blender/editors/space_clip/space_clip.c2
3 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/linestyle.c b/source/blender/blenkernel/intern/linestyle.c
index f47f86744af..3ab1a8093be 100644
--- a/source/blender/blenkernel/intern/linestyle.c
+++ b/source/blender/blenkernel/intern/linestyle.c
@@ -183,7 +183,7 @@ static LineStyleModifier *new_modifier(int type, size_t size)
m = (LineStyleModifier *)MEM_callocN(size, "line style modifier");
m->type = type;
- strcpy(m->name, modifier_name[type]);
+ BLI_strncpy(m->name, modifier_name[type], sizeof(m->name));
m->influence = 1.0f;
m->flags = LS_MODIFIER_ENABLED | LS_MODIFIER_EXPANDED;
diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c
index 3ccf5038d87..173b193b752 100644
--- a/source/blender/blenkernel/intern/mball.c
+++ b/source/blender/blenkernel/intern/mball.c
@@ -2446,6 +2446,7 @@ bool BKE_mball_center_median(MetaBall *mb, float r_cent[3])
for (ml = mb->elems.first; ml; ml = ml->next) {
add_v3_v3(r_cent, &ml->x);
+ total++;
}
if (total) {
diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c
index 36cf9fc44c6..2cbb2373be8 100644
--- a/source/blender/editors/space_clip/space_clip.c
+++ b/source/blender/editors/space_clip/space_clip.c
@@ -1019,7 +1019,7 @@ static void clip_refresh(const bContext *C, ScrArea *sa)
if (ar_channels && !(ar_channels->flag & RGN_FLAG_HIDDEN)) {
ar_channels->flag |= RGN_FLAG_HIDDEN;
ar_channels->v2d.flag &= ~V2D_IS_INITIALISED;
- WM_event_remove_handlers((bContext *)C, &ar_tools->handlers);
+ WM_event_remove_handlers((bContext *)C, &ar_channels->handlers);
view_changed = TRUE;
}
if (ar_channels && ar_channels->alignment != RGN_ALIGN_NONE) {