Mercurial > vim
comparison src/ex_cmds.c @ 3242:48252b5fd170 v7.3.390
updated for version 7.3.390
Problem: Using NULL buffer pointer in a window.
Solution: Check for w_buffer being NULL in more places. (Bjorn Winckler)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Fri, 30 Dec 2011 15:01:59 +0100 |
parents | 074ddc768fea |
children | 9ccdc4a69d8f |
comparison
equal
deleted
inserted
replaced
3241:0203fd123bce | 3242:48252b5fd170 |
---|---|
3388 u_sync(FALSE); | 3388 u_sync(FALSE); |
3389 close_buffer(oldwin, curbuf, | 3389 close_buffer(oldwin, curbuf, |
3390 (flags & ECMD_HIDE) ? 0 : DOBUF_UNLOAD); | 3390 (flags & ECMD_HIDE) ? 0 : DOBUF_UNLOAD); |
3391 | 3391 |
3392 #ifdef FEAT_AUTOCMD | 3392 #ifdef FEAT_AUTOCMD |
3393 /* Autocommands may open a new window and leave oldwin open | |
3394 * which leads to crashes since the above call sets | |
3395 * oldwin->w_buffer to NULL. */ | |
3396 if (curwin != oldwin && oldwin != aucmd_win | |
3397 && win_valid(oldwin) && oldwin->w_buffer == NULL) | |
3398 win_close(oldwin, FALSE); | |
3399 | |
3393 # ifdef FEAT_EVAL | 3400 # ifdef FEAT_EVAL |
3394 if (aborting()) /* autocmds may abort script processing */ | 3401 if (aborting()) /* autocmds may abort script processing */ |
3395 { | 3402 { |
3396 vim_free(new_name); | 3403 vim_free(new_name); |
3397 goto theend; | 3404 goto theend; |