Skip to content

Commit 3e8b9bc

Browse files
committed
Fix ImGui stack corruption when pushing a child window.
1 parent da34aec commit 3e8b9bc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

repentogon/ImGuiFeatures/CustomImGui.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1142,8 +1142,8 @@ struct CustomImGui {
11421142
if (ImGui::BeginChild(element->name.c_str(), element->data.size, element->data.childFlags, element->data.windowFlags)) {
11431143
RunCallbacks(&(*element));
11441144
DrawElements(element->children, overflowElements);
1145-
ImGui::EndChild();
11461145
}
1146+
ImGui::EndChild();
11471147
break;
11481148
}
11491149
case IMGUI_ELEMENT::Menu:

repentogon/ImGuiFeatures/LogViewer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,8 @@ struct LogViewer : ImGuiWindowObject {
281281
if (autoscroll && ImGui::GetScrollY() >= ImGui::GetScrollMaxY())
282282
ImGui::SetScrollHereY(1.0f);
283283
ImGui::PopStyleVar();
284-
ImGui::EndChild();
285284
}
285+
ImGui::EndChild();
286286
}
287287
ImGui::End(); // close window element
288288
}

0 commit comments

Comments
 (0)