[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40277] branches/soc-2011-onion-uv-tools/ source/blender/editors/mesh/editmesh_lib.c: Another evil bug squashed: Due to reshufling of UvElements on island data generation, it was possible to generate negative addresses.
Antony Riakiotakis
kalast at gmail.com
Sat Sep 17 00:03:47 CEST 2011
Revision: 40277
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40277
Author: psy-fi
Date: 2011-09-16 22:03:46 +0000 (Fri, 16 Sep 2011)
Log Message:
-----------
Another evil bug squashed: Due to reshufling of UvElements on island data generation, it was possible to generate negative addresses. This led to crashes when stitching or using uv sculpting with just a part of the mesh selected(and thus accessing these negative addresses on initialization).
Modified Paths:
--------------
branches/soc-2011-onion-uv-tools/source/blender/editors/mesh/editmesh_lib.c
Modified: branches/soc-2011-onion-uv-tools/source/blender/editors/mesh/editmesh_lib.c
===================================================================
--- branches/soc-2011-onion-uv-tools/source/blender/editors/mesh/editmesh_lib.c 2011-09-16 21:07:34 UTC (rev 40276)
+++ branches/soc-2011-onion-uv-tools/source/blender/editors/mesh/editmesh_lib.c 2011-09-16 22:03:46 UTC (rev 40277)
@@ -2537,7 +2537,10 @@
}
/* Remap */
for(i = 0; i < em->totvert; i++){
- vmap->vert[i] = &islandbuf[map[vmap->vert[i] - vmap->buf]];
+ /* important since we may do selection only. Some of these may be NULL */
+ if(vmap->vert[i]){
+ vmap->vert[i] = &islandbuf[map[vmap->vert[i] - vmap->buf]];
+ }
}
vmap->islandIndices = MEM_callocN(sizeof(*vmap->islandIndices)*nislands,"UvVertMap2_island_indices");
if(!vmap->islandIndices)
More information about the Bf-blender-cvs
mailing list