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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2017-11-05 15:34:40 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-11-05 15:34:40 +0300
commit2837a7e198a15381ec00e190c1c7c9a628d3412b (patch)
tree7fd0b316dd29b8214df5126eb0fc5891f07a603e /source
parent914e3b1645288daf7468ed21527fe6cc78d70938 (diff)
Cleanup: remove paranoid NULL check
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/BKE_library.h2
-rw-r--r--source/blender/blenkernel/intern/library.c5
2 files changed, 1 insertions, 6 deletions
diff --git a/source/blender/blenkernel/BKE_library.h b/source/blender/blenkernel/BKE_library.h
index b5104b35b3c..cd449b4d840 100644
--- a/source/blender/blenkernel/BKE_library.h
+++ b/source/blender/blenkernel/BKE_library.h
@@ -151,7 +151,7 @@ void id_sort_by_name(struct ListBase *lb, struct ID *id);
void BKE_id_expand_local(struct Main *bmain, struct ID *id);
void BKE_id_copy_ensure_local(struct Main *bmain, const struct ID *old_id, struct ID *new_id);
-bool new_id(struct ListBase *lb, struct ID *id, const char *name);
+bool new_id(struct ListBase *lb, struct ID *id, const char *name) ATTR_NONNULL(1, 2);
void id_clear_lib_data(struct Main *bmain, struct ID *id);
void id_clear_lib_data_ex(struct Main *bmain, struct ID *id, const bool id_in_mainlist);
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index d8617ef44e4..6bf2b10b3ee 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -1782,10 +1782,6 @@ bool new_id(ListBase *lb, ID *id, const char *tname)
if (ID_IS_LINKED_DATABLOCK(id))
return false;
- /* if no libdata given, look up based on ID */
- if (lb == NULL)
- lb = which_libbase(G.main, GS(id->name));
-
/* if no name given, use name of current ID
* else make a copy (tname args can be const) */
if (tname == NULL)
@@ -2329,7 +2325,6 @@ void BLI_libblock_ensure_unique_name(Main *bmain, const char *name)
ListBase *lb;
ID *idtest;
-
lb = which_libbase(bmain, GS(name));
if (lb == NULL) return;