forked from bartvdbraak/blender
Subsurf: missing NULL checks on free
This commit is contained in:
parent
0f1ffd4792
commit
765b842f95
@ -579,8 +579,14 @@ static float *_vert_getNo(CCGVert *v, int lvl, int dataSize, int normalDataOffse
|
||||
|
||||
static void _vert_free(CCGVert *v, CCGSubSurf *ss)
|
||||
{
|
||||
CCGSUBSURF_free(ss, v->edges);
|
||||
CCGSUBSURF_free(ss, v->faces);
|
||||
if (v->edges) {
|
||||
CCGSUBSURF_free(ss, v->edges);
|
||||
}
|
||||
|
||||
if (v->faces) {
|
||||
CCGSUBSURF_free(ss, v->faces);
|
||||
}
|
||||
|
||||
CCGSUBSURF_free(ss, v);
|
||||
}
|
||||
|
||||
@ -669,7 +675,10 @@ static void *_edge_getCoVert(CCGEdge *e, CCGVert *v, int lvl, int x, int dataSiz
|
||||
|
||||
static void _edge_free(CCGEdge *e, CCGSubSurf *ss)
|
||||
{
|
||||
CCGSUBSURF_free(ss, e->faces);
|
||||
if (e->faces) {
|
||||
CCGSUBSURF_free(ss, e->faces);
|
||||
}
|
||||
|
||||
CCGSUBSURF_free(ss, e);
|
||||
}
|
||||
static void _edge_unlinkMarkAndFree(CCGEdge *e, CCGSubSurf *ss)
|
||||
|
Loading…
Reference in New Issue
Block a user