Fix a crash in 3D viewer when changing preferences.
It was possible for OnMouseMove to come after ReloadRequest but before DoRePaint. Which meant m_3d_render_raytracing->Reload() has't been called yet, thus the BVH contained invalid data. Fixes https://gitlab.com/kicad/code/kicad/-/issues/16059
This commit is contained in:
parent
c95ed281b8
commit
5cd1a4674f
|
@ -632,6 +632,9 @@ void EDA_3D_CANVAS::OnMagnify( wxMouseEvent& event )
|
|||
|
||||
void EDA_3D_CANVAS::OnMouseMove( wxMouseEvent& event )
|
||||
{
|
||||
if( m_3d_render && m_3d_render->IsReloadRequestPending() )
|
||||
return; // Prevents using invalid m_3d_render_raytracing data
|
||||
|
||||
if( m_camera_is_moving )
|
||||
return;
|
||||
|
||||
|
|
Loading…
Reference in New Issue