solstice-solver

Solver library of the solstice app
git clone git://git.meso-star.com/solstice-solver.git
Log | Files | Refs | README | LICENSE

commit 71f160fd196d497b883737f91245c8c4d37f913c
parent 8e0cce78aec15f77fa9ed4ed6d0827f2d045c9f4
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date:   Fri,  4 Nov 2016 15:48:10 +0100

BugFix: refcounting done too late.

Diffstat:
Msrc/ssol_shape.c | 9++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/ssol_shape.c b/src/ssol_shape.c @@ -517,6 +517,10 @@ shape_create res = RES_MEM_ERR; goto error; } + SSOL(device_ref_get(dev)); + shape->dev = dev; + shape->type = type; + ref_init(&shape->ref); /* Create the s3d_shape to ray-trace */ res = s3d_shape_create_mesh(dev->s3d, &shape->shape_rt); @@ -529,11 +533,6 @@ shape_create res = s3d_shape_create_mesh(dev->s3d, &shape->shape_samp); if(res != RES_OK) goto error; - SSOL(device_ref_get(dev)); - shape->dev = dev; - ref_init(&shape->ref); - shape->type = type; - exit: if(out_shape) *out_shape = shape; return res;