Fix segmentation fault when stopping stream

This commit is contained in:
Sebastian Palencsar
2026-05-28 07:09:40 +02:00
parent 599c55f609
commit 42c1b66950
2 changed files with 6 additions and 3 deletions

View File

@@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed metadata overwrite bug where valid ICY stream metadata was being cleared.
- Fixed DBus crash (segmentation fault) under KDE Plasma Wayland by making notification requests asynchronous.
- Fixed regex parser bug with stream titles containing apostrophes.
- Fixed crash (segmentation fault) in IcyReader when changing or stopping streams.
---

View File

@@ -40,9 +40,10 @@ void IcyReader::start(const QString &url)
void IcyReader::stop()
{
if (m_reply) {
m_reply->abort();
m_reply->deleteLater();
QNetworkReply *reply = m_reply;
m_reply = nullptr;
reply->abort();
reply->deleteLater();
}
m_state = ReadingAudio;
m_metaInt = 0;
@@ -106,8 +107,9 @@ void IcyReader::onReadyRead()
void IcyReader::onFinished()
{
if (m_reply) {
m_reply->deleteLater();
QNetworkReply *reply = m_reply;
m_reply = nullptr;
reply->deleteLater();
}
}