Fixed crash when placing a component in standalone eeschema

Fixes: lp:1668157
* https://bugs.launchpad.net/kicad/+bug/1668157
This commit is contained in:
Maciej Suminski 2017-02-27 10:29:43 +01:00
parent d6097cf1aa
commit 9ead2b068b
1 changed files with 5 additions and 4 deletions

View File

@ -28,11 +28,12 @@ FOOTPRINT_PREVIEW_PANEL* FOOTPRINT_PREVIEW_PANEL::InstallOnPanel(
{
FOOTPRINT_PREVIEW_PANEL* fpp = NULL;
KIFACE* kiface = aKiway.KiFACE( KIWAY::FACE_PCB );
if( !kiface )
return NULL;
try {
KIFACE* kiface = aKiway.KiFACE( KIWAY::FACE_PCB );
if( !kiface )
return NULL;
fpp = static_cast<FOOTPRINT_PREVIEW_PANEL*>(
kiface->CreateWindow( aPanel, FRAME_PCB_FOOTPRINT_PREVIEW, &aKiway ) );
} catch( ... )