changeset 11232:a14090a30a3f v8.0.0502

patch 8.0.0502: Coverity complains about possible NULL pointer commit https://github.com/vim/vim/commit/a37ffaa5e0a47e2db27bc0cc23f49e7094f47f3b Author: Bram Moolenaar <Bram@vim.org> Date: Tue Mar 21 21:58:00 2017 +0100 patch 8.0.0502: Coverity complains about possible NULL pointer Problem: Coverity complains about possible NULL pointer. Solution: Add an assert(), let's see if this works on all systems.
author Christian Brabandt <cb@256bit.org>
date Tue, 21 Mar 2017 22:00:04 +0100
parents 72f9a73ceca8
children d6bf6847abad
files src/version.c src/window.c
diffstat 2 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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,
--- 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;
     }