diff --git a/recording-daemon/output.c b/recording-daemon/output.c index 47cda87fc..841e538c8 100644 --- a/recording-daemon/output.c +++ b/recording-daemon/output.c @@ -414,7 +414,7 @@ void output_close(metafile_t *mf, output_t *output, tag_t *tag, bool discard) { } else { output_shutdown(output); - if (unlink(output->filename)) + if (output->filename && unlink(output->filename)) ilog(LOG_WARN, "Failed to unlink '%s%s%s': %s", FMT_M(output->filename), strerror(errno)); db_delete_stream(mf, output);