aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--buffer.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/buffer.c b/buffer.c
index f67dd26..3b2352a 100644
--- a/buffer.c
+++ b/buffer.c
@@ -761,8 +761,10 @@ readBufferCache(Buffer *buf)
}
#endif
}
- buf->lastLine = prevl;
- buf->lastLine->next = NULL;
+ if (prevl) {
+ buf->lastLine = prevl;
+ buf->lastLine->next = NULL;
+ }
fclose(cache);
unlink(buf->savecache);
buf->savecache = NULL;