From 0e49de867de8b7f8793b4b628cfe4125c40459ec Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 21 May 2021 19:30:28 +0200 Subject: [PATCH] input/last: add nullptr check to Open(), fixes assertion failure Closes https://github.com/MusicPlayerDaemon/MPD/issues/1168 --- NEWS | 1 + src/input/LastInputStream.hxx | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 6b89726c5..93030ee9e 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,5 @@ ver 0.22.8 (not yet released) +* fix crash bug in "albumart" command (0.22.7 regression) ver 0.22.7 (2021/05/19) * protocol diff --git a/src/input/LastInputStream.hxx b/src/input/LastInputStream.hxx index 2121772a0..635e87741 100644 --- a/src/input/LastInputStream.hxx +++ b/src/input/LastInputStream.hxx @@ -69,7 +69,8 @@ public: is = open(new_uri, mutex); uri = std::forward(new_uri); - ScheduleClose(); + if (is) + ScheduleClose(); return is.get(); }