]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.0.0502: Coverity complains about possible NULL pointer v8.0.0502
authorBram Moolenaar <Bram@vim.org>
Tue, 21 Mar 2017 20:58:00 +0000 (21:58 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 21 Mar 2017 20:58:00 +0000 (21:58 +0100)
Problem:    Coverity complains about possible NULL pointer.
Solution:   Add an assert(), let's see if this works on all systems.

src/version.c
src/window.c

index a1edd07d7b4728eec92d5acd44b697e5934115c0..4b2ff6f5d9f497fb3b32c6160751513ffdbc48a4 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    502,
 /**/
     501,
 /**/
index eed0ea9e7d71cbc58f5c12379dd88075e4c8e229..2ef319805e4d589b1424f7fff09d7238800d5c6e 100644 (file)
@@ -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;
     }