Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenlib/intern/listbase.c')
-rw-r--r--source/blender/blenlib/intern/listbase.c11
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)
{