aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2014-08-17 21:12:53 +0000
committerJustin M. Keyes <justinkz@gmail.com>2014-08-20 00:09:21 -0400
commit95efb3624b321cdbe5b958e3dfab0045d6de5439 (patch)
treefcf8a35a512401677e6b379ec16d08e6dd645179
parente1c330a486c184152cb48d637c6d04caba5290bd (diff)
downloadrneovim-95efb3624b321cdbe5b958e3dfab0045d6de5439.tar.gz
rneovim-95efb3624b321cdbe5b958e3dfab0045d6de5439.tar.bz2
rneovim-95efb3624b321cdbe5b958e3dfab0045d6de5439.zip
vim-patch:7.4.317 #1076
Problem: Crash when starting gvim. Issue 230. Solution: Check for a pointer to be NULL. (Christian Brabandt) https://code.google.com/p/vim/source/detail?r=8ffcb546d782
-rw-r--r--src/nvim/version.c2
-rw-r--r--src/nvim/window.c7
2 files changed, 6 insertions, 3 deletions
diff --git a/src/nvim/version.c b/src/nvim/version.c
index 246ce02f1f..91ef23548d 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -278,7 +278,7 @@ static int included_patches[] = {
//320,
//319 NA
318,
- //317,
+ 317,
//316 NA
315,
314,
diff --git a/src/nvim/window.c b/src/nvim/window.c
index 050f5e2acd..3499b14688 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -3730,8 +3730,11 @@ void win_alloc_lines(win_T *wp)
*/
void win_free_lsize(win_T *wp)
{
- free(wp->w_lines);
- wp->w_lines = NULL;
+ // TODO: why would wp be NULL here?
+ if (wp != NULL) {
+ free(wp->w_lines);
+ wp->w_lines = NULL;
+ }
}
/*