Check for presence of prevl before using

This commit is contained in:
David Crosby
2015-07-26 00:12:39 -06:00
committed by Tatsuya Kinoshita
parent dac68e4d90
commit 66036b0db6

View File

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