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

Double clicking window bar causes IM_ASSERT #34

Open
jvcleave opened this issue May 23, 2016 · 0 comments
Open

Double clicking window bar causes IM_ASSERT #34

jvcleave opened this issue May 23, 2016 · 0 comments
Labels
legacy-version For issues releated to the older legacy code, before all the refactorings in the develop branch.

Comments

@jvcleave
Copy link
Owner

Might be a logic error but something like this

if(showStatsWindow)
        {
            if(ImGui::Begin("App Stats", &showStatsWindow))
            {
                ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
                ImGui::End();
            }
        }

would trigger an error here:
https://github.com/jvcleave/ofxImGui/blob/master/libs/imgui/src/imgui.cpp#L2355

if the window bar was double-clicked quickly.

The below implementation doesn't seem to have the same issue

if(showStatsWindow)
        {
            if(!ImGui::Begin("App Stats", &showStatsWindow))
            {
               ImGui::End(); 
            }else
            {
                ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
                ImGui::End();
            }
        }

I tried this PR as well but it didn't make a difference
#33

@Daandelange Daandelange added the legacy-version For issues releated to the older legacy code, before all the refactorings in the develop branch. label Jul 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
legacy-version For issues releated to the older legacy code, before all the refactorings in the develop branch.
Projects
None yet
Development

No branches or pull requests

2 participants