Skip to content

Material::Initialize() dereferences a possibly-null buffer #171

Description

@CanReader

src/Graphics/Common/Material.cpp:15-20; src/Graphics/Common/ResourceManager.cpp:24;
include/.../SmartPointer.hpp:37

m_materialBuffer->SetSlot(1) at :15-20 is unguarded, but ResourceManager::CreateBuffer returns nullptr
on failure (ResourceManager.cpp:24) and SmartPointer::operator-> does not null-check (SmartPointer.hpp:37).

What marks this as a genuine oversight rather than an accepted invariant: every other use of
m_materialBuffer in the same file is guarded
.

Runs on every backend. Severity: crash.

Found by a full audit of the graphics layer. Assessed severity: crash.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: renderingRenderer, shaders, post processingbugSomething isn't workingcrashCauses a crash or hangpriority: criticalCrash, data loss, or blocks other work

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions