mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
TreeNode: fixed runtime asan warning (#2920)
imgui_widgets.cpp:6923:52: runtime error: shift exponent -1 is negative
This commit is contained in:
parent
a0b3eceec7
commit
f6fc166584
1 changed files with 1 additions and 1 deletions
|
|
@ -6914,7 +6914,7 @@ void ImGui::TreeNodeDrawLineToChildNode(const ImVec2& target_pos)
|
|||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
ImGuiWindow* window = g.CurrentWindow;
|
||||
if ((window->DC.TreeHasStackDataDepthMask & (1 << (window->DC.TreeDepth - 1))) == 0)
|
||||
if (window->DC.TreeDepth == 0 || (window->DC.TreeHasStackDataDepthMask & (1 << (window->DC.TreeDepth - 1))) == 0)
|
||||
return;
|
||||
|
||||
ImGuiTreeNodeStackData* parent_data = &g.TreeNodeStack.Data[g.TreeNodeStack.Size - 1];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue