diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-29 06:34:48 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-29 06:34:48 +0300 |
commit | 559fff160ecd23e636769e1f79fa5fbfdedcd3b1 (patch) | |
tree | 88b7415e7222224eecd43d6575309fd8b3cd8954 | |
parent | 9893fee4e6ce5949c8d3274b2746855b3095258f (diff) |
Debug: Assert to ensure layer iterator uses a 3D view
-rw-r--r-- | source/blender/blenkernel/intern/layer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c index 9931c29a8c2..f525893a854 100644 --- a/source/blender/blenkernel/intern/layer.c +++ b/source/blender/blenkernel/intern/layer.c @@ -45,6 +45,7 @@ #include "BKE_object.h" #include "DNA_ID.h" +#include "DNA_space_types.h" #include "DNA_collection_types.h" #include "DNA_layer_types.h" #include "DNA_object_types.h" @@ -1104,6 +1105,7 @@ typedef struct LayerObjectBaseIteratorData { static bool object_bases_iterator_is_valid_ex(View3D *v3d, Base *base, const int flag) { if (v3d != NULL) { + BLI_assert(v3d->spacetype == SPACE_VIEW3D); if ((v3d->object_type_exclude_viewport & (1 << base->object->type)) != 0) { return false; } |