diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2019-05-24 15:49:40 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2019-05-24 15:52:28 +0300 |
commit | fae58962493010f7c9c7d78f79e64165539f4317 (patch) | |
tree | 85a06b11924f7fe0d8422ddbca2668687f53d8cc /source/blender/blenkernel/intern | |
parent | a875e8167403ff4cf9ae5c5a120e16afec7b8368 (diff) |
Fix T65059: Crash in empty scenes for context _bases functions
Bug introduced on 0910932e71d2.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/context.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/context.c b/source/blender/blenkernel/intern/context.c index 9d753319cfa..28b0ae23ffe 100644 --- a/source/blender/blenkernel/intern/context.c +++ b/source/blender/blenkernel/intern/context.c @@ -404,11 +404,9 @@ static int ctx_data_base_collection_get(const bContext *C, const char *member, L ListBase ctx_object_list; bool ok = false; - if (!ctx_data_collection_get(C, member, &ctx_object_list)) { - return 0; - } - - if (BLI_listbase_is_empty(&ctx_object_list)) { + if ((ctx_data_collection_get(C, member, &ctx_object_list) == false) || + BLI_listbase_is_empty(&ctx_object_list)) { + BLI_listbase_clear(list); return 0; } |