[Bf-committers] Group freeing bug

Jiří Hnídek jiri.hnidek at tul.cz
Sun Mar 19 12:29:11 CET 2006


> Looking at this again.
> the problem is also with *rem_from_group* in group.c
> 
> So best add this into
> 
> void free_group_object(GroupObject *go)
> {
>    MEM_freeN(go);
> }
> 
> _________ Change to,
> 
> void free_group_object(GroupObject *go)
> {
>    Object *ob;
>    Base *base;
>    ob=go->ob;
>    MEM_freeN(go);
>    if (ob) {
>       /* check to see if the group flag needs to be changed.*/
>       if (!find_group(ob)) {
>           go->ob->flag &= ~OB_FROMGROUP;
>           base= object_in_scene(go->ob, G.scene);
>           if (base) base->flag &= ~OB_FROMGROUP;
>        }
>    }
> }

Hi,
after fast look at your code I have to say, that this is *strange*:

MEM_freeN(go);
...
go->ob->flag &= ~OB_FROMGROUP;


I would replace all "go->ob" with "ob", for example: ob>flag &=
~OB_FROMGROUP; ... sure, it isn't the best solution, but it explains,
what is wrong ;-).

Jiri
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jiri.hnidek.vcf
Type: text/x-vcard
Size: 383 bytes
Desc: not available
Url : http://projects.blender.org/pipermail/bf-committers/attachments/20060319/da69db13/jiri.hnidek.vcf


More information about the Bf-committers mailing list