Commit d22361f7 authored by Max Kellermann's avatar Max Kellermann

output/Shout: remove unnecessary nullptr check

parent 06c7e551
...@@ -299,17 +299,15 @@ write_page(ShoutOutput *sd) ...@@ -299,17 +299,15 @@ write_page(ShoutOutput *sd)
void void
ShoutOutput::Close() ShoutOutput::Close()
{ {
if (encoder != nullptr) { try {
try { encoder->End();
encoder->End(); write_page(this);
write_page(this); } catch (const std::runtime_error &) {
} catch (const std::runtime_error &) { /* ignore */
/* ignore */
}
delete encoder;
} }
delete encoder;
if (shout_get_connected(shout_conn) != SHOUTERR_UNCONNECTED && if (shout_get_connected(shout_conn) != SHOUTERR_UNCONNECTED &&
shout_close(shout_conn) != SHOUTERR_SUCCESS) { shout_close(shout_conn) != SHOUTERR_SUCCESS) {
FormatWarning(shout_output_domain, FormatWarning(shout_output_domain,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment