From: Bram Moolenaar Date: Tue, 21 Mar 2017 20:58:00 +0000 (+0100) Subject: patch 8.0.0502: Coverity complains about possible NULL pointer X-Git-Tag: v8.0.0502 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a37ffaa5e0a47e2db27bc0cc23f49e7094f47f3b;p=thirdparty%2Fvim.git 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. --- diff --git a/src/version.c b/src/version.c index a1edd07d7b..4b2ff6f5d9 100644 --- a/src/version.c +++ b/src/version.c @@ -764,6 +764,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 502, /**/ 501, /**/ diff --git a/src/window.c b/src/window.c index eed0ea9e7d..2ef319805e 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; }