diff --git a/Modules/Graphics/RHI/Base/Sources/Methane/Graphics/Base/RenderCommandList.cpp b/Modules/Graphics/RHI/Base/Sources/Methane/Graphics/Base/RenderCommandList.cpp index dc56ac28d..528d00774 100644 --- a/Modules/Graphics/RHI/Base/Sources/Methane/Graphics/Base/RenderCommandList.cpp +++ b/Modules/Graphics/RHI/Base/Sources/Methane/Graphics/Base/RenderCommandList.cpp @@ -138,7 +138,9 @@ void RenderCommandList::SetViewState(Rhi::IViewState& view_state) return; } - META_LOG("{} Command list '{}' SET VIEW STATE:\n{}", magic_enum::enum_name(GetType()), GetName(), static_cast(drawing_state.view_state_ptr->GetSettings())); + META_LOG("{} Command list '{}' SET VIEW STATE:\n{}", + magic_enum::enum_name(GetType()), GetName(), + drawing_state.view_state_ptr ? static_cast(drawing_state.view_state_ptr->GetSettings()) : std::string()); drawing_state.view_state_ptr = static_cast(&view_state); drawing_state.view_state_ptr->Apply(*this); drawing_state.changes |= DrawingState::Change::ViewState; diff --git a/Modules/Graphics/RHI/Metal/Include/Methane/Graphics/Metal/CommandQueue.hh b/Modules/Graphics/RHI/Metal/Include/Methane/Graphics/Metal/CommandQueue.hh index 7bad6b347..d070ae3df 100644 --- a/Modules/Graphics/RHI/Metal/Include/Methane/Graphics/Metal/CommandQueue.hh +++ b/Modules/Graphics/RHI/Metal/Include/Methane/Graphics/Metal/CommandQueue.hh @@ -62,7 +62,7 @@ private: void Reset(); id m_mtl_command_queue = nil; - Ptr m_timestamp_query_pool_ptr = std::make_shared(*this, 1000U); + Ptr m_timestamp_query_pool_ptr = std::make_shared(*this, 1000U); }; } // namespace Methane::Graphics::Metal diff --git a/Modules/Graphics/RHI/Null/Include/Methane/Graphics/Null/CommandQueue.h b/Modules/Graphics/RHI/Null/Include/Methane/Graphics/Null/CommandQueue.h index 4b2a9b208..544a84372 100644 --- a/Modules/Graphics/RHI/Null/Include/Methane/Graphics/Null/CommandQueue.h +++ b/Modules/Graphics/RHI/Null/Include/Methane/Graphics/Null/CommandQueue.h @@ -49,7 +49,7 @@ class CommandQueue final const Ptr& GetTimestampQueryPoolPtr() override { return m_timestamp_query_pool_ptr; } private: - Ptr m_timestamp_query_pool_ptr = std::make_shared(*this, 1000U); + const Ptr m_timestamp_query_pool_ptr = std::make_shared(*this, 1000U); }; } // namespace Methane::Graphics::Null