From 5355335f190016e2611a2029a982755c0cfa817b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 30 Jul 2021 13:08:34 +0200 Subject: [PATCH] db/simple/ExportedSong: check src.OwnsTag(), not this->OwnsTag() this->OwnsTag() accesses fields that are not yet initialized. --- NEWS | 2 ++ src/db/plugins/simple/ExportedSong.hxx | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 7b0c94c90..e18e3ba81 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,8 @@ ver 0.22.10 (not yet released) * protocol - support "albumart" for virtual tracks in CUE sheets +* database + - simple: fix crash bug ver 0.22.9 (2021/06/23) * database diff --git a/src/db/plugins/simple/ExportedSong.hxx b/src/db/plugins/simple/ExportedSong.hxx index 9a2d54a85..31f3946f2 100644 --- a/src/db/plugins/simple/ExportedSong.hxx +++ b/src/db/plugins/simple/ExportedSong.hxx @@ -53,7 +53,7 @@ public: moved-from instance also owned the Tag which its LightSong::tag field refers to */ - OwnsTag() ? tag_buffer : src.tag), + src.OwnsTag() ? tag_buffer : src.tag), tag_buffer(std::move(src.tag_buffer)) {} ExportedSong &operator=(ExportedSong &&) = delete;