summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/inlines.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/inlines.c b/src/inlines.c
index 63f8036..7ef5e78 100644
--- a/src/inlines.c
+++ b/src/inlines.c
@@ -283,17 +283,13 @@ static void remove_delimiter(subject *subj, delimiter *delim)
if (delim->next == NULL) {
// end of list:
assert(delim == subj->last_delim);
- if (delim->previous != NULL) {
- delim->previous->next = NULL;
- }
subj->last_delim = delim->previous;
- } else if (delim->previous == NULL) {
- // start of list, with something after it
- delim->next->previous = NULL;
- } else { // neither start nor end:
- delim->previous->next = delim->next;
+ } else {
delim->next->previous = delim->previous;
}
+ if (delim->previous != NULL) {
+ delim->previous->next = delim->next;
+ }
free(delim);
}