]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - mp.c
server.c: Fix double "the" in comment.
[paraslash.git] / mp.c
diff --git a/mp.c b/mp.c
index bade05bcf866103b5bd794af4ae1ae6ce8cb5b72..416b4f92065ef79716e7f966c3102e995071a112 100644 (file)
--- a/mp.c
+++ b/mp.c
@@ -491,10 +491,10 @@ int mp_init(const char *definition, int nbytes, struct mp_context **result,
        struct mp_context *ctx;
        struct yy_buffer_state *buffer_state;
 
+       *result = NULL;
        if (!definition || nbytes == 0) { /* dummy mood */
                if (errmsg)
                        *errmsg = NULL;
-               *result = NULL;
                return 0;
        }
        ctx = para_calloc(sizeof(*ctx));
@@ -541,6 +541,8 @@ bool mp_eval_row(const struct osl_row *aft_row, struct mp_context *ctx)
 {
        if (!ctx) /* dummy mood */
                return true;
+       if (!ctx->ast) /* empty mood */
+               return true;
        assert(aft_row);
        ctx->aft_row = aft_row;
        ctx->have_afsi = false;