coverity/13702: open_spellbuf: handle failed ml_open()

This commit is contained in:
Nick Neisen
2018-05-16 19:18:16 -06:00
committed by Justin M. Keyes
parent 189a5f2b95
commit c2d1684e05

View File

@@ -2487,7 +2487,9 @@ buf_T *open_spellbuf(void)
buf->b_spell = true; buf->b_spell = true;
buf->b_p_swf = true; // may create a swap file buf->b_p_swf = true; // may create a swap file
ml_open(buf); if (ml_open(buf) == FAIL) {
ELOG("Error opening a new memline");
}
ml_open_file(buf); // create swap file now ml_open_file(buf); // create swap file now
return buf; return buf;