Skip to content

Fix crash on fetching lyrics - #662

Open
cornelius-sevald wants to merge 1 commit into
ncmpcpp:masterfrom
cornelius-sevald:fix-lyrics-fetch-crash
Open

cornelius-sevald wants to merge 1 commit into
ncmpcpp:masterfrom
cornelius-sevald:fix-lyrics-fetch-crash

Conversation

@cornelius-sevald

Copy link
Copy Markdown

Fixes #649

Changes the inner type of the m_worker future from boost::optional to LyricsFetcher::Result (i.e. a std::pair).
For some reason, calling get() on a future optional value will crash if the value is none, so I use the more primitive std::pair with a boolean flag instead (like LyricsFetcher does).

NOTE: I'm really not very proficient at C++, and it's not a very clean fix, so feel free to disregard.

Fixes ncmpcpp#649

Changes the inner type of the `m_worker` future from `boost::optional`
to `LyricsFetcher::Result` (i.e. a `std::pair`).
For some reason, calling `get()` on a future optional value will crash
if the value is `none`, so I use the more primitive pair instead.
@alkino

alkino commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Can you confirm that the bug is fixed with the last master and close this PR if yes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Crash when trying to search lyrics on the internet

2 participants