summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2021-07-30 13:08:34 +0200
committerMax Kellermann <max@musicpd.org>2021-07-30 13:10:09 +0200
commit5355335f190016e2611a2029a982755c0cfa817b (patch)
tree485a1c33ce78574f03aedec58fe3a4f6c45c5fd2
parent64fa76c56826cdb89a0eb9b24553bdf6293fe434 (diff)
db/simple/ExportedSong: check src.OwnsTag(), not this->OwnsTag()
this->OwnsTag() accesses fields that are not yet initialized.
-rw-r--r--NEWS2
-rw-r--r--src/db/plugins/simple/ExportedSong.hxx2
2 files changed, 3 insertions, 1 deletions
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;