[Bf-committers] Memory bug

Brecht Van Lommel brechtvanlommel at pandora.be
Thu Feb 10 19:54:57 CET 2011


Hi,

On Thu, Feb 10, 2011 at 5:40 PM,  <raulf at info.upr.edu.cu> wrote:
> float *vert= (float *)MEM_callocN(3*me->totverts*sizeof(float ),
> "vertsmooth");
>        eve= em->verts.first;
>        int counter = 0;
>        while(eve) {
>                if(eve->f & SELECT) {
>                        (eve->tmp).p = &vert[counter];
>                        (eve->tmp).fp = 0.f;

Don't set fp to 0.f, since tmp is a union this also affects p. You can
one of the two, but not both at the same time.

Brecht.


More information about the Bf-committers mailing list