Adding nullptr checks in Gems/ for Get3DEngine()

This commit is contained in:
Aristo7
2021-05-03 15:21:27 -04:00
parent 71c5df040f
commit 954e158454
4 changed files with 15 additions and 9 deletions
@@ -48,7 +48,7 @@ namespace PhysX
AzToolsFramework::EditorRequests::Bus::BroadcastResult(editor, &AzToolsFramework::EditorRequests::GetEditor);
ISurfaceTypeEnumerator* surfaceTypeEnumerator = nullptr;
if (editor)
if (editor && editor->Get3DEngine())
{
surfaceTypeEnumerator = editor->Get3DEngine()->GetMaterialManager()->GetSurfaceTypeManager()->GetEnumerator();
}