From 586f146a847ebfa875f70554baec9b317e4aacc0 Mon Sep 17 00:00:00 2001 From: John Jones-Steele <82226755+jjjoness@users.noreply.github.com> Date: Mon, 13 Dec 2021 17:56:46 +0000 Subject: [PATCH] Fixed nullptr error (#6386) Signed-off-by: John Jones-Steele <82226755+jjjoness@users.noreply.github.com> --- .../AzToolsFramework/UI/Outliner/EntityOutlinerListModel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerListModel.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerListModel.cpp index 0b882324b5..056f16c52f 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerListModel.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerListModel.cpp @@ -548,11 +548,11 @@ namespace AzToolsFramework AZ::EntityId entityId = GetEntityFromIndex(index); // Only allow renaming the entity if the UI Handler did not block it. - auto entityUiHandler = m_editorEntityUiInterface->GetHandler(entityId); + auto entityUiHandler = m_editorEntityUiInterface ? m_editorEntityUiInterface->GetHandler(entityId) : nullptr; bool canRename = !entityUiHandler || entityUiHandler->CanRename(entityId); // Disable renaming for read-only entities. - bool isReadOnly = m_readOnlyEntityPublicInterface->IsReadOnly(entityId); + bool isReadOnly = m_readOnlyEntityPublicInterface ? m_readOnlyEntityPublicInterface->IsReadOnly(entityId) : false; Qt::ItemFlags itemFlags = QAbstractItemModel::flags(index); switch (index.column())