]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - mood.c
Merge topic branch t/afs-ls-a into master
[paraslash.git] / mood.c
diff --git a/mood.c b/mood.c
index 18c02f7fa2f0529175c4b84bfc73600354fa3211..b4d50c88e73533c69e7473c072e3aaef1c196d99 100644 (file)
--- a/mood.c
+++ b/mood.c
@@ -663,9 +663,10 @@ int mood_load(const char *mood_name, struct mood_instance **result, char **msg)
                mood_unload(NULL);
                current_mood = aa.m;
        }
+       ret = 1;
 out:
        free(aa.array);
-       if (ret < 0)
+       if (ret <= 0) /* error, or no admissible files */
                destroy_mood(aa.m);
        return ret;
 }