From 1b8667dcc8749b5890b101e3621c6ef0d3bfd677 Mon Sep 17 00:00:00 2001 From: Sebastian Krajewski Date: Tue, 1 Oct 2024 23:20:10 +0200 Subject: [PATCH] Fix crash on hovering open beatmap button if link is not available --- launcher/songselect.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/launcher/songselect.go b/launcher/songselect.go index 5892d7ea..88186146 100644 --- a/launcher/songselect.go +++ b/launcher/songselect.go @@ -325,7 +325,7 @@ func (m *songSelectPopup) drawSongSelect() { s := b.bMaps[0].SetID == 0 if s { - imgui.PushItemFlag(imgui.ItemFlags(imgui.ItemFlagsDisabled), true) + imgui.BeginDisabled() } ImIO.SetFontGlobalScale(16.0 / 32) @@ -336,6 +336,10 @@ func (m *songSelectPopup) drawSongSelect() { platform.OpenURL(fmt.Sprintf("https://osu.ppy.sh/s/%d", b.bMaps[0].SetID)) } + if s { + imgui.EndDisabled() + } + ImIO.SetFontGlobalScale(1) imgui.PopFont() @@ -351,10 +355,6 @@ func (m *songSelectPopup) drawSongSelect() { imgui.EndTooltip() } - if s { - imgui.PopItemFlag() - } - imgui.SameLine() name := "\uF04B"