summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-03-21 21:58:00 +0100
committerBram Moolenaar <Bram@vim.org>2017-03-21 21:58:00 +0100
commita37ffaa5e0a47e2db27bc0cc23f49e7094f47f3b (patch)
tree44266e6dca65e36d0e2c7e8112bd1d96c882b354
parentb2964f2570574b4c66f3645d69956fec99f2af3e (diff)
downloadvim-git-8.0.0502.tar.gz
patch 8.0.0502: Coverity complains about possible NULL pointerv8.0.0502
Problem: Coverity complains about possible NULL pointer. Solution: Add an assert(), let's see if this works on all systems.
-rw-r--r--src/version.c2
-rw-r--r--src/window.c1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/version.c b/src/version.c
index a1edd07d7..4b2ff6f5d 100644
--- a/src/version.c
+++ b/src/version.c
@@ -765,6 +765,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 502,
+/**/
501,
/**/
500,
diff --git a/src/window.c b/src/window.c
index eed0ea9e7..2ef319805 100644
--- a/src/window.c
+++ b/src/window.c
@@ -3806,6 +3806,7 @@ close_tabpage(tabpage_T *tab)
for (ptp = first_tabpage; ptp != NULL && ptp->tp_next != tab;
ptp = ptp->tp_next)
;
+ assert(ptp != NULL);
ptp->tp_next = tab->tp_next;
}