[Bf-blender-cvs] [f7fc558] id-remap: libquery foreach looper: in recursive case, do not bother with NULL id pointers!

Bastien Montagne noreply at git.blender.org
Wed Mar 30 21:38:57 CEST 2016


Commit: f7fc55867a3e7d68a16bfa503a9651310aadd380
Author: Bastien Montagne
Date:   Wed Mar 30 21:36:09 2016 +0200
Branches: id-remap
https://developer.blender.org/rBf7fc55867a3e7d68a16bfa503a9651310aadd380

libquery foreach looper: in recursive case, do not bother with NULL id pointers!

===================================================================

M	source/blender/blenkernel/intern/library_query.c

===================================================================

diff --git a/source/blender/blenkernel/intern/library_query.c b/source/blender/blenkernel/intern/library_query.c
index c9b7b8e..d29d219 100644
--- a/source/blender/blenkernel/intern/library_query.c
+++ b/source/blender/blenkernel/intern/library_query.c
@@ -88,7 +88,7 @@
 		if (_flag & IDWALK_READONLY) { \
 			BLI_assert(*(id_pp) == old_id); \
 		} \
-		if (_flag & IDWALK_RECURSE) { \
+		if (old_id && (_flag & IDWALK_RECURSE)) { \
 			if (!BLI_gset_haskey((_data)->ids_handled, old_id)) { \
 				BLI_gset_add((_data)->ids_handled, old_id); \
 				if (!(callback_return & IDWALK_RET_STOP_RECURSION)) { \




More information about the Bf-blender-cvs mailing list