Merge pull request #645 from MgAl2O4/fix-imguiDialogCrash

This commit is contained in:
goaaats 2021-10-14 19:12:32 +02:00 committed by GitHub
commit ff05b70e9d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 5 deletions

View file

@ -327,12 +327,15 @@ namespace Dalamud.Interface.ImGuiFileDialog
Text = "Documents",
});
this.quickAccess.Add(new SideBarItem
if (!string.IsNullOrEmpty(personal))
{
Icon = (char)FontAwesomeIcon.Download,
Location = Path.Combine(personal, "Downloads"),
Text = "Downloads",
});
this.quickAccess.Add(new SideBarItem
{
Icon = (char)FontAwesomeIcon.Download,
Location = Path.Combine(personal, "Downloads"),
Text = "Downloads",
});
}
this.quickAccess.Add(new SideBarItem
{

View file

@ -335,6 +335,11 @@ namespace Dalamud.Interface.ImGuiFileDialog
foreach (var quick in this.quickAccess)
{
if (string.IsNullOrEmpty(quick.Location))
{
continue;
}
ImGui.PushFont(UiBuilder.IconFont);
if (ImGui.Selectable($"{quick.Icon}##{quick.Text}", quick.Text == this.selectedSideBar))
{