diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2015-04-06 16:37:12 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2015-04-06 16:37:12 +0300 |
commit | 3519a9f5179132251d60cd7660e8b257f41de76d (patch) | |
tree | be6b81d2c439249af96b8b28b5013dcbb735b937 /source/blender/blenlib/intern/scanfill_utils.c | |
parent | bdf398daa805cc233d5cdf1a08bf6f71f0d5f994 (diff) | |
parent | 74df307ca43df14b759fd9eb6a049a6c5d90dcda (diff) |
Merge remote-tracking branch 'origin/master' into multiviewmultiview
Diffstat (limited to 'source/blender/blenlib/intern/scanfill_utils.c')
-rw-r--r-- | source/blender/blenlib/intern/scanfill_utils.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/scanfill_utils.c b/source/blender/blenlib/intern/scanfill_utils.c index a606ac41aa1..d0420a30448 100644 --- a/source/blender/blenlib/intern/scanfill_utils.c +++ b/source/blender/blenlib/intern/scanfill_utils.c @@ -112,11 +112,13 @@ void BLI_scanfill_view3d_dump(ScanFillContext *sf_ctx) static ListBase *edge_isect_ls_ensure(GHash *isect_hash, ScanFillEdge *eed) { ListBase *e_ls; - e_ls = BLI_ghash_lookup(isect_hash, eed); - if (e_ls == NULL) { - e_ls = MEM_callocN(sizeof(ListBase), __func__); - BLI_ghash_insert(isect_hash, eed, e_ls); + void **val_p; + + if (!BLI_ghash_ensure_p(isect_hash, eed, &val_p)) { + *val_p = MEM_callocN(sizeof(ListBase), __func__); } + e_ls = *val_p; + return e_ls; } |