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

  1. added this to the 0.1 Stability milestone on Sep 4, 2026
  2. added
    bugSomething isn't working
    area: renderingRenderer, shaders, post processing
    priority: criticalCrash, data loss, or blocks other work
    crashCauses a crash or hang
    on Sep 4, 2026
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