Skip to content

Assertion failed for InputText without label #4796

@neclepsio

Description

@neclepsio

Version/Branch of Dear ImGui:

Version: 1.85
Branch: master

Back-end/Renderer/Compiler/OS

Back-ends: imgui_impl_glfw3.cpp + imgui_impl_opengl.cpp
Compiler: gcc
Operating System: Windows

My Issue/Question:

With the following example, as soon as I click on the InputText, I get this assertion failed:

Assertion failed: mouse_button >= 0 && mouse_button < ImGuiMouseButton_COUNT, file ../../imgui_widgets.cpp, line 624

Standalone, minimal, complete and verifiable example: (see #2261)

I modified example_glfw_opengl3 to add the following code before ImGui::End().

static char* text = 0;
if (text == 0) {
    text = new char[100];
    text[0] = 0;
}
ImGui::InputText("", text, 100);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions