fix: call end if necessary

This commit is contained in:
Anna 2021-04-26 14:17:07 -04:00
parent 82c1fcd8e8
commit 6adeaa0d9c
1 changed files with 6 additions and 1 deletions

View File

@ -34,7 +34,12 @@ namespace Tourist {
private void Draw() {
ImGui.SetNextWindowSize(new Vector2(350f, 450f), ImGuiCond.FirstUseEver);
if (!this.Show || !ImGui.Begin(this.Plugin.Name, ref this._show, ImGuiWindowFlags.MenuBar)) {
if (!this.Show) {
return;
}
if (!ImGui.Begin(this.Plugin.Name, ref this._show, ImGuiWindowFlags.MenuBar)) {
ImGui.End();
return;
}