Merge branch 't/configure_fix'
[paraslash.git] / mood.c
diff --git a/mood.c b/mood.c
index 1a572cfa8f1859a946ea34708b48e990a036f5b2..f580400dd52bfe4d129f7526034745929b0cdf7e 100644 (file)
--- a/mood.c
+++ b/mood.c
@@ -364,8 +364,10 @@ static int load_mood(const struct osl_row *mood_row, struct mood **m)
        char *mood_name;
        struct osl_object mood_def;
        struct mood_line_parser_data mlpd = {.line_num = 0};
-       int ret = mood_get_name_and_def_by_row(mood_row, &mood_name, &mood_def);
+       int ret;
 
+       *m = NULL;
+       ret = mood_get_name_and_def_by_row(mood_row, &mood_name, &mood_def);
        if (ret < 0)
                return ret;
        if (!*mood_name)