Fixed crash when using mouse wheel before the 3D scene is shown (during app startup)

This commit is contained in:
Enrico Turri
2019-04-09 11:18:40 +02:00
parent 3bb76e6881
commit 0fb218d6ce

View File

@@ -2313,6 +2313,9 @@ void GLCanvas3D::on_key(wxKeyEvent& evt)
void GLCanvas3D::on_mouse_wheel(wxMouseEvent& evt)
{
if (!m_initialized)
return;
// Ignore the wheel events if the middle button is pressed.
if (evt.MiddleIsDown())
return;