Skip to content

Commit

Permalink
Fix crash on hovering open beatmap button if link is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
Wieku committed Oct 1, 2024
1 parent 1661f1a commit 1b8667d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions launcher/songselect.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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()

Expand All @@ -351,10 +355,6 @@ func (m *songSelectPopup) drawSongSelect() {
imgui.EndTooltip()
}

if s {
imgui.PopItemFlag()
}

imgui.SameLine()

name := "\uF04B"
Expand Down

0 comments on commit 1b8667d

Please sign in to comment.