diff --git a/shared/test/common/mocks/mock_logical_state_helper.h b/shared/test/common/mocks/mock_logical_state_helper.h index 18d960dc10..38522f8060 100644 --- a/shared/test/common/mocks/mock_logical_state_helper.h +++ b/shared/test/common/mocks/mock_logical_state_helper.h @@ -22,9 +22,11 @@ class LogicalStateHelperMock : public GfxFamily::LogicalStateHelperHw { writeStreamInlineCalledCounter++; if (makeFakeStreamWrite) { - auto cmd = linearStream.getSpaceForCmd(); - *cmd = GfxFamily::cmdInitNoop; - cmd->setIdentificationNumber(0x123); + auto cmd = GfxFamily::cmdInitNoop; + cmd.setIdentificationNumber(0x123); + + auto cmdBuffer = linearStream.getSpaceForCmd(); + *cmdBuffer = cmd; } }