From d3576a1b71018349bd8348e63b81f224b689aa6e 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/1165 --- src/input/LastInputStream.hxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(); }