← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] Remove backtracking wires in eeschema

 

Le 23/06/2015 15:19, Chris Pavlina a écrit :
> Sure, I can. I usually prefer to use dynamic_cast because it will fail 
> if the subclass isn't correct (even if you don't test, since a NULL 
> access will result in a segfault) - just more or less as a sanity check. 
> There's really no circumstance under which the pointer should not be an 
> instance of SCH_LINE, and the behavior when it fails with dynamic_cast 
> is a bit more obvious.
> 
> I can throw an assert in there, though, that'd definitely be more 
> correct. Modified patch attached.

Thanks.

But there is yet something strange for me:
I am thinking data is used after deleting:
delete s_wires.Remove( line ) delete the data referenced by line.
then after p = line and last_line = line.
but p->Next() and last_line->GetStartPoint() use this deleted data.

I can be wrong.

-- 
Jean-Pierre CHARRAS


Follow ups

References