← Back to team overview

kicad-developers team mailing list archive

[BUGFIX] Segfault on pin editor

 

Since I broke it (IIRC), I fixed it.

DrawGraphicText takes a panel as an argument; however it's optional (the pin preview in eeschema call it in this way)... the 'too small to draw' code path tries to get the clipbox so when it's NULL it segfaults.

It's doubly silly since there is already a clipbox correctly acquired (i.e. valid or null)

=== modified file 'common/drawtxt.cpp'
--- common/drawtxt.cpp  2012-06-09 09:38:58 +0000
+++ common/drawtxt.cpp  2012-08-22 19:58:53 +0000
@@ -392,7 +392,7 @@
             aCallback( current_char_pos.x, current_char_pos.y, end.x, end.y );
         }
         else
-            GRLine( aPanel->GetClipBox(), aDC,
+            GRLine( clipbox, aDC,
                     current_char_pos.x, current_char_pos.y, end.x, end.y, aWidth, aColor );
 
         return;


-- 
Lorenzo Marcantonio
Logos Srl


Follow ups