mirror of
https://github.com/izzy2lost/libultraship.git
synced 2026-06-19 01:16:13 -07:00
Move DrawContents and closing ImGui::End inside else tied to ImGui::Begin to prevent crash. (#643)
This commit is contained in:
@@ -66,9 +66,10 @@ void GuiWindow::Draw() {
|
||||
}
|
||||
if (!ImGui::Begin(mName.c_str(), &mIsVisible, mWindowFlags)) {
|
||||
ImGui::End();
|
||||
} else {
|
||||
DrawElement();
|
||||
ImGui::End();
|
||||
}
|
||||
DrawElement();
|
||||
ImGui::End();
|
||||
// Sync up the IsVisible flag if it was changed by ImGui
|
||||
SyncVisibilityConsoleVariable();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user