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

Calling WaitAndRender() inside ImGui draw loop will crash #2

Open
Halen84 opened this issue Aug 23, 2023 · 0 comments
Open

Calling WaitAndRender() inside ImGui draw loop will crash #2

Halen84 opened this issue Aug 23, 2023 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@Halen84
Copy link
Owner

Halen84 commented Aug 23, 2023

This issue is very similar to #1, but this issue only happens if WaitAndRender() is called anywhere inside the ImGui draw loop, like CMenu::Draw().

For example, calling WaitAndRender() in any function after ImGui::Button is pressed.

if (ImGui::Button("Button"))
{
    // A crash will happen here if WaitAndRender() is called at any point inside this statement.
}

WaitAndRender() works perfectly fine if called inside the main script loop for example.

@Halen84 Halen84 added bug Something isn't working help wanted Extra attention is needed labels Aug 25, 2023
Halen84 added a commit that referenced this issue Jan 19, 2024
This commit also adds a check for ImGui::IsKeyReleased() in menu.cpp for closing the menu with a key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant