Revision: 20862
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20862
Author:   sirdude
Date:     2009-06-13 18:57:26 +0200 (Sat, 13 Jun 2009)

Log Message:
-----------
coverity issue CID: 469
Checker: REVERSE_INULL (help)
File: base/src/source/blender/blenkernel/intern/BME_tools.c
Function: BME_split_face
Description: Pointer "example" dereferenced before NULL check

Check for null before we try to use it.

Kent

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/BME_tools.c

Modified: trunk/blender/source/blender/blenkernel/intern/BME_tools.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/BME_tools.c  2009-06-13 
16:52:01 UTC (rev 20861)
+++ trunk/blender/source/blender/blenkernel/intern/BME_tools.c  2009-06-13 
16:57:26 UTC (rev 20862)
@@ -192,7 +192,7 @@
        nf = BME_SFME(bm,f,v1,v2,nl);
        nf->flag = f->flag;
        /* if the edge was selected, select this face, too */
-       if (example->flag & SELECT) f->flag |= ME_FACE_SEL;
+       if (example && (example->flag & SELECT)) f->flag |= ME_FACE_SEL;
        nf->h = f->h;
        nf->mat_nr = f->mat_nr;
        if (nl && example) {


_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to