X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=mood.c;fp=mood.c;h=b4d50c88e73533c69e7473c072e3aaef1c196d99;hb=4345aa176aecdbd9a876e7efdcc034acd29616a7;hp=18c02f7fa2f0529175c4b84bfc73600354fa3211;hpb=ab4c39c7cd1c6d2b03cedf5d83521c746433367b;p=paraslash.git diff --git a/mood.c b/mood.c index 18c02f7f..b4d50c88 100644 --- 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; }