From 74d373e6fab5799eb2672586ecc1566b3c2e4163 Mon Sep 17 00:00:00 2001 From: dickelbeck Date: Wed, 23 Jan 2008 01:52:32 +0000 Subject: [PATCH] fix segfault --- pcbnew/export_gencad.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pcbnew/export_gencad.cpp b/pcbnew/export_gencad.cpp index cf855da7cb..6c7993a594 100644 --- a/pcbnew/export_gencad.cpp +++ b/pcbnew/export_gencad.cpp @@ -194,7 +194,7 @@ void CreatePadsShapesSection( FILE* file, BOARD* pcb ) fputs( "$PADS\n", file ); - if( pcb->m_NbPads > 0 ) + if( pcb->m_NbPads > 0 ) // pcb->m_Pads is NULL unless this is true { // Generation de la liste des pads tries par forme et dimensions: memsize = (pcb->m_NbPads + 1) * sizeof(D_PAD *); @@ -227,7 +227,8 @@ void CreatePadsShapesSection( FILE* file, BOARD* pcb ) fprintf( file, "PAD PAD%d", pad->m_logical_connexion ); - dx = pad->m_Size.x / 2; dy = pad->m_Size.y / 2; + dx = pad->m_Size.x / 2; + dy = pad->m_Size.y / 2; switch( pad->m_PadShape ) { @@ -302,8 +303,7 @@ void CreatePadsShapesSection( FILE* file, BOARD* pcb ) fputs( "$ENDPADS\n\n", file ); - if( pad_list_base ) - MyFree( pad_list_base ); + MyFree( pad_list_base ); }