Exit gracefully when there are errors during initialization.

This commit is contained in:
Maciej Suminski 2015-08-07 17:07:43 +02:00
parent 5caa1523bd
commit 5cd464f244
1 changed files with 1 additions and 2 deletions

View File

@ -288,9 +288,8 @@ bool PGM_SINGLE_TOP::OnPgmInit( wxApp* aWxApp )
// We've already initialized things at this point, but wx won't call OnExit if
// we fail out. Call our own cleanup routine here to ensure the relevant resources
// are freed at the right time (if they aren't, segfaults will occur).
#if defined( KICAD_SCRIPTING_WXPYTHON )
OnPgmExit();
#endif
// Fail the process startup if the file could not be opened,
// although this is an optional choice, one that can be reversed
// also in the KIFACE specific OpenProjectFiles() return value.