Disable logging at exit on FreeBSD.

This commit fixes a crash on KiCad exit for FreeBSD.

Usage of the wxLog functions in destructors on program generates an
infinite recursive call loop and segfault on this platform.

The workaround is inpired by:
  https://people.freebsd.org/~wpaul/kicad/kicad_instructions.txt

Fixes: lp:1778334
* https://bugs.launchpad.net/kicad/+bug/1778334
This commit is contained in:
Martin Aberg 2018-06-23 12:51:01 +02:00 committed by Tomasz Wlostowski
parent 73a8d2a9d5
commit 47a4099e64
1 changed files with 5 additions and 0 deletions

View File

@ -241,6 +241,11 @@ struct APP_KICAD : public wxApp
{
program.OnPgmExit();
#if defined(__FreeBSD__)
/* Avoid wxLog crashing when used in destructors. */
wxLog::EnableLogging( false );
#endif
return wxApp::OnExit();
}