Fix SEGV on close with TrainTool->Stop()

.. casting the sidebar in TrainView was wrong because the
   controls are in the sidebar, not the trainTool. Thus
   it would crash on exit .. but strangely only on Mac!

.. the code now correctly calls trainTool->Stop(), quite
   why it fails on Mac only is a bit of a mystery.
This commit is contained in:
Mark Liversedge
2013-08-06 11:10:32 +01:00
parent b692bed4ed
commit dec5ec5699
2 changed files with 1 additions and 2 deletions

View File

@@ -179,7 +179,7 @@ TrainView::~TrainView()
void
TrainView::close()
{
static_cast<TrainSidebar*>(sidebar())->Stop();
trainTool->Stop();
p->close();
}