fix crash
This commit is contained in:
@@ -63,6 +63,11 @@ double ArenaView::gameSpeed() const
|
||||
return m_gameSpeedMultiplier;
|
||||
}
|
||||
|
||||
void ArenaView::stopRendering()
|
||||
{
|
||||
m_renderTimer->stop();
|
||||
}
|
||||
|
||||
void ArenaView::togglePause()
|
||||
{
|
||||
if (m_gameSpeedMultiplier < 0.001)
|
||||
|
||||
@@ -29,6 +29,7 @@ public:
|
||||
void setGameSpeed(double multiplier);
|
||||
double gameSpeed() const;
|
||||
void togglePause();
|
||||
void stopRendering();
|
||||
|
||||
signals:
|
||||
void speedChanged(double multiplier);
|
||||
|
||||
@@ -112,6 +112,7 @@ InspectWindow::InspectWindow(ArenaSimulation* sim, const VisualsConfig* visuals,
|
||||
|
||||
void InspectWindow::closeEvent(QCloseEvent* event)
|
||||
{
|
||||
m_arenaView->stopRendering();
|
||||
m_pollTimer->stop();
|
||||
emit closed();
|
||||
event->accept();
|
||||
|
||||
Reference in New Issue
Block a user