Skip to content

Conversation

@3x3y3z3t
Copy link
Contributor

Describe the issue (if no issue has been made)

RendererAPI creation in RenderCommand.cpp will crash if we try to log something in RendererAPI::Create() function (See #574).

PR impact

List of related issues/PRs this will solve:

Impact Issue/PR
Issues this solves Fix #574

Proposed fix

Instead of initializing RendererAPI with Create() function, we first initialize it with nullptr, then we actually create it in RenderCommand::Init() when Hazel's Log system is available.

Additional context

statics should not be initialized by calling the program's other system, since that system may not be available at that point.
In this situation, a call to RendererAPI::Create() was made during the (static) initialization phase, which may cause trouble if that function continues to call to other not yet available system.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crashes in RenderCommand during early initialization

1 participant