diff options
author | Ton Roosendaal <ton@blender.org> | 2006-06-22 14:34:01 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-06-22 14:34:01 +0400 |
commit | 75c6fe760f23e4b0d804cfafff0aeed2470c563b (patch) | |
tree | 5683d491253429747bb1a23cda742188161e2d6c /source/blender/src/editmesh_tools.c | |
parent | bf6ecd67d98b5e5bf39622c9e58d133a386e6f52 (diff) |
Bugfix #4411
New option "Loop to region" selection crashed when no valid loop was
selected. Just a NULL pointer check.
Also: unified function declaration syntax, so it matches with rest of code.
Diffstat (limited to 'source/blender/src/editmesh_tools.c')
-rw-r--r-- | source/blender/src/editmesh_tools.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/source/blender/src/editmesh_tools.c b/source/blender/src/editmesh_tools.c index f1796af7ffe..ab428aa7194 100644 --- a/source/blender/src/editmesh_tools.c +++ b/source/blender/src/editmesh_tools.c @@ -5778,7 +5778,8 @@ typedef struct wUVEdgeCollect{ /*used for grouping*/ int id; } wUVEdgeCollect; -static void append_weldedUV(EditFace *efa, EditVert *eve, int tfindex, ListBase *uvverts){ +static void append_weldedUV(EditFace *efa, EditVert *eve, int tfindex, ListBase *uvverts) +{ wUV *curwvert, *newwvert; wUVNode *newnode; int found; @@ -5812,7 +5813,8 @@ static void append_weldedUV(EditFace *efa, EditVert *eve, int tfindex, ListBase } } -static void build_weldedUVs(ListBase *uvverts){ +static void build_weldedUVs(ListBase *uvverts) +{ EditFace *efa; for(efa=G.editMesh->faces.first; efa; efa=efa->next){ if(efa->v1->f1) append_weldedUV(efa, efa->v1, 0, uvverts); @@ -5822,7 +5824,8 @@ static void build_weldedUVs(ListBase *uvverts){ } } -static void append_weldedUVEdge(EditFace *efa, EditEdge *eed, ListBase *uvedges){ +static void append_weldedUVEdge(EditFace *efa, EditEdge *eed, ListBase *uvedges) +{ wUVEdge *curwedge, *newwedge; int v1tfindex, v2tfindex, found; @@ -5857,7 +5860,8 @@ static void append_weldedUVEdge(EditFace *efa, EditEdge *eed, ListBase *uvedges) } } -static void build_weldedUVEdges(ListBase *uvedges, ListBase *uvverts){ +static void build_weldedUVEdges(ListBase *uvedges, ListBase *uvverts) +{ wUV *curwvert; wUVEdge *curwedge; @@ -5888,14 +5892,15 @@ static void build_weldedUVEdges(ListBase *uvedges, ListBase *uvverts){ } } -static void free_weldedUVs(ListBase *uvverts){ +static void free_weldedUVs(ListBase *uvverts) +{ wUV *curwvert; for(curwvert = uvverts->first; curwvert; curwvert=curwvert->next) BLI_freelistN(&(curwvert->nodes)); BLI_freelistN(uvverts); } -static void collapse_edgeuvs(void){ - EditEdge *eed; +static void collapse_edgeuvs(void) +{ ListBase uvedges, uvverts, allcollections; wUVEdge *curwedge; wUVNode *curwnode; @@ -6443,6 +6448,9 @@ static int loop_bisect(Collection *edgecollection){ } } + if(sf1==NULL || sf2==NULL) + return(-1); + if(!(sf1->e1->f1)) sf1->e1->f2 = 1; if(!(sf1->e2->f1)) sf1->e2->f2 = 1; if(!(sf1->e3->f1)) sf1->e3->f2 = 1; |