*
* If there is already an open mood, it will be closed first.
*
- * \return Positive on success, negative on errors. Loading the dummy mood
- * always succeeds.
+ * \return Positive on success, negative on errors.
*
* \sa struct \ref afs_info::last_played, \ref mp_eval_row().
*/
if (ret < 0) {
if (errmsg)
*errmsg = make_message("audio file loop failed");
- return ret;
+ goto out;
}
for (i = 0; i < statistics.num; i++) {
struct admissible_file_info *a = aa.array + i;
ret = statistics.num;
out:
free(aa.array);
+ if (ret < 0)
+ close_current_mood();
return ret;
}