From 7de43e4aec8036867c7d4f887cda484966b797a7 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Mon, 16 Sep 2013 19:56:45 -0400 Subject: [PATCH] Fix broken CvPcb footprint preview. (fixes lp:1226272) --- cvpcb/class_DisplayFootprintsFrame.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cvpcb/class_DisplayFootprintsFrame.cpp b/cvpcb/class_DisplayFootprintsFrame.cpp index 44810b1abc..9f28f4b220 100644 --- a/cvpcb/class_DisplayFootprintsFrame.cpp +++ b/cvpcb/class_DisplayFootprintsFrame.cpp @@ -476,7 +476,7 @@ EDA_COLOR_T DISPLAY_FOOTPRINTS_FRAME::GetGridColor() const MODULE* DISPLAY_FOOTPRINTS_FRAME::Get_Module( const wxString& aFootprintName ) { - MODULE* footprint; + MODULE* footprint = NULL; try { @@ -550,6 +550,9 @@ MODULE* DISPLAY_FOOTPRINTS_FRAME::Get_Module( const wxString& aFootprintName ) } footprint = pi->FootprintLoad( libPath, aFootprintName ); + + if( footprint != NULL ) + break; } #endif }