Merge pull request #68 from jodiecunningham/master
authorMichael Göhler <somebody.here@gmx.de>
Fri, 26 Dec 2014 20:22:09 +0000 (21:22 +0100)
committerMichael Göhler <somebody.here@gmx.de>
Fri, 26 Dec 2014 20:22:09 +0000 (21:22 +0100)
fix header-only file crash, fixes #67

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;
     }