fix header-only file crash, fixes #67
authorJodie Cunningham <jodie.cunningham@gmail.com>
Fri, 26 Dec 2014 16:07:21 +0000 (10:07 -0600)
committerJodie Cunningham <jodie.cunningham@gmail.com>
Fri, 26 Dec 2014 16:07:21 +0000 (10:07 -0600)
src/markdown.c

index 05c77be..8471724 100644 (file)
@@ -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;
     }