diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-03-20 19:41:01 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-03-20 19:41:01 +0300 |
commit | 391cc2d004c5fc231ac546d89f64ae4ba5c062c0 (patch) | |
tree | a89e10b9b3d496e99079cd0778c09495ccc8ad1b /source/blender/blenlib/intern/listbase.c | |
parent | 7178f10b81006082937de8fa8be90076f478da64 (diff) |
merge own commits into render branch into trunk since 27560
27562, 27570, 27571, 27574, 27576, 27577, 27579, 27590, 27591, 27594, 27595, 27596, 27599, 27605, 27611, 27612, 27613, 27614, 27623
Diffstat (limited to 'source/blender/blenlib/intern/listbase.c')
-rw-r--r-- | source/blender/blenlib/intern/listbase.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/listbase.c b/source/blender/blenlib/intern/listbase.c index 5d046dce023..0a6831558d1 100644 --- a/source/blender/blenlib/intern/listbase.c +++ b/source/blender/blenlib/intern/listbase.c @@ -108,6 +108,17 @@ void BLI_remlink(ListBase *listbase, void *vlink) if (listbase->first == link) listbase->first = link->next; } +int BLI_remlink_safe(ListBase *listbase, void *vlink) +{ + if(BLI_findindex(listbase, vlink) != -1) { + BLI_remlink(listbase, vlink); + return 1; + } + else { + return 0; + } +} + void BLI_freelinkN(ListBase *listbase, void *vlink) { |