]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - mood.c
Merge branch 'maint'
[paraslash.git] / mood.c
diff --git a/mood.c b/mood.c
index e0d9e2750dd65b53f988e9b7ff06b981300cc31f..a228b2432f9b56d3bc51535c13d74094314e7da9 100644 (file)
--- a/mood.c
+++ b/mood.c
@@ -163,6 +163,8 @@ static int load_mood(const struct osl_row *mood_row, struct mood **m,
        PARA_INFO_LOG("opening mood %s\n", mood_name);
        ret = mp_init(mood_def.data, mood_def.size, &(*m)->parser_context, errmsg);
        osl_close_disk_object(&mood_def);
+       if (ret < 0)
+               destroy_mood(*m);
        return ret;
 }
 
@@ -605,8 +607,7 @@ static void compute_correction_factors(int64_t sse)
  *
  * 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().
  */