Fix Editor crash in test teardown calling set_view_pane_layout

If Atom isn't initialized and able to produce a ViewportContext, the Editor would crash. This attempts to make the initialization fail a bit more gracefully and fixes the crash in the cases I've tested.
This commit is contained in:
nvsickle
2021-04-21 17:42:02 -07:00
parent 104262e048
commit fb2ca8e02c
6 changed files with 49 additions and 12 deletions
@@ -38,7 +38,7 @@ namespace MaterialEditor
{
MaterialViewportWidget::MaterialViewportWidget(QWidget* parent)
: AtomToolsFramework::RenderViewportWidget(AzFramework::InvalidViewportId, parent)
: AtomToolsFramework::RenderViewportWidget(parent)
, m_ui(new Ui::MaterialViewportWidget)
{
m_ui->setupUi(this);