From: Jodie Cunningham Date: Fri, 26 Dec 2014 16:07:21 +0000 (-0600) Subject: fix header-only file crash, fixes #67 X-Git-Url: https://git.danieliu.xyz/?a=commitdiff_plain;h=f6eba201ce1ec4118d501ff7afa547324143c9b9;p=smdp.git fix header-only file crash, fixes #67 --- diff --git a/src/markdown.c b/src/markdown.c index 05c77be..8471724 100644 --- a/src/markdown.c +++ b/src/markdown.c @@ -81,6 +81,8 @@ void free_deck(deck_t *deck) { while (slide) { free_line(slide->line); next = slide->next; + if (slide == NULL) + return; free(slide); slide = next; }