Minor comments about current usages of `BKE_main_namemap_destroy`.
This commit is contained in:
parent
430cc9d7bf
commit
961d99d3a4
|
@ -214,6 +214,8 @@ static void setup_app_data(bContext *C,
|
|||
SWAP(ListBase, bmain->wm, bfd->main->wm);
|
||||
SWAP(ListBase, bmain->workspaces, bfd->main->workspaces);
|
||||
SWAP(ListBase, bmain->screens, bfd->main->screens);
|
||||
/* NOTE: UI IDs are assumed to be only local data-blocks, so no need to call
|
||||
* #BKE_main_namemap_clear here (otherwise, the swapping would fail in many funny ways). */
|
||||
if (bmain->name_map != nullptr) {
|
||||
BKE_main_namemap_destroy(&bmain->name_map);
|
||||
}
|
||||
|
|
|
@ -186,6 +186,7 @@ void BKE_main_free(Main *mainvar)
|
|||
BKE_main_idmap_destroy(mainvar->id_map);
|
||||
}
|
||||
|
||||
/* NOTE: `name_map` in libraries are freed together with the library IDs above. */
|
||||
if (mainvar->name_map) {
|
||||
BKE_main_namemap_destroy(&mainvar->name_map);
|
||||
}
|
||||
|
|
|
@ -207,6 +207,8 @@ static void wm_window_match_init(bContext *C, ListBase *wmlist)
|
|||
|
||||
BLI_listbase_clear(&G_MAIN->wm);
|
||||
if (G_MAIN->name_map != nullptr) {
|
||||
/* NOTE: UI IDs are assumed to be only local data-blocks, so no need to call
|
||||
* #BKE_main_namemap_clear here. */
|
||||
BKE_main_namemap_destroy(&G_MAIN->name_map);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue