SpaiR / imgui-java

JNI based binding for Dear ImGui
MIT License
551 stars 90 forks source link

InputText with resizable ImString crashes if the ImGuiInputTextCallback is null. #158

Closed brunopj1 closed 1 year ago

brunopj1 commented 1 year ago

I'm trying to render an InputText with a resizable buffer. If I call ImGui.inputText("input", str, ImGuiInputTextFlags.CallbackResize), when I write in the input field I get a NullPointerException coming from a native method. However, if I set the ImGuiInputTextCallback, the string gets resized correctly, even if the callback doesn't do anything.

Is this an expected behavior?