diff --git a/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp b/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp index a12f4c1395..fcf33b5f83 100644 --- a/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp +++ b/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp @@ -568,7 +568,7 @@ void DIALOG_MODULE_BOARD_EDITOR::BrowseAndAdd3DShapeFile() } if( !S3D::Select3DModel( this, Prj().Get3DCacheManager(), - initialpath, filter, &model ) ) + initialpath, filter, &model ) || model.filename.empty() ) { return; } diff --git a/pcbnew/dialogs/dialog_edit_module_for_Modedit.cpp b/pcbnew/dialogs/dialog_edit_module_for_Modedit.cpp index fe72ebec54..b16f3f82bb 100644 --- a/pcbnew/dialogs/dialog_edit_module_for_Modedit.cpp +++ b/pcbnew/dialogs/dialog_edit_module_for_Modedit.cpp @@ -435,7 +435,7 @@ void DIALOG_MODULE_MODULE_EDITOR::BrowseAndAdd3DShapeFile() } if( !S3D::Select3DModel( m_PreviewPane, Prj().Get3DCacheManager(), - initialpath, filter, &model ) ) + initialpath, filter, &model ) || model.filename.empty() ) { return; }