Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes early crash in RenderCommand.cpp (#574) #575

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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