← Back to team overview

kicad-developers team mailing list archive

Is this condition in pcbnew correct?

 

Hello everybody.

I'm learning KiCAD sources in order to add some hotkeys. And I found one condition which seems to me to be not correct:
pcbnew/hotkeys.cpp, line 730 (svn rev 2135):

DrawStruct = PcbGeneralLocateAndDisplay();
if( DrawStruct && DrawStruct->Type() != TYPE_TRACK )
return FALSE;
Delete_Track( DC, (TRACK*) DrawStruct );

Shoudn't this condition be written as
if( !DrawStruct || DrawStruct->Type() != TYPE_TRACK )
return FALSE;

?

--
Regards,
Sergey A. Borshch mailto: sb-sf@...