input/last: add nullptr check to Open(), fixes assertion failure

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1168
This commit is contained in:
Max Kellermann 2021-05-21 19:30:28 +02:00
parent f2e4529707
commit 0e49de867d
2 changed files with 3 additions and 1 deletions

1
NEWS
View File

@ -1,4 +1,5 @@
ver 0.22.8 (not yet released) ver 0.22.8 (not yet released)
* fix crash bug in "albumart" command (0.22.7 regression)
ver 0.22.7 (2021/05/19) ver 0.22.7 (2021/05/19)
* protocol * protocol

View File

@ -69,7 +69,8 @@ public:
is = open(new_uri, mutex); is = open(new_uri, mutex);
uri = std::forward<U>(new_uri); uri = std::forward<U>(new_uri);
ScheduleClose(); if (is)
ScheduleClose();
return is.get(); return is.get();
} }