Fix T50900: Text-Blocks created from "Edit Source" have zero users.

This commit is contained in:
Bastien Montagne 2017-03-10 15:41:14 +01:00
parent 9d6acc34a1
commit 15eb83c8b3
Notes: blender-bot 2023-02-14 19:28:50 +01:00
Referenced by issue #50900, Text-Blocks created from "Edit Source" have zero users.
Referenced by issue blender/blender-addons#55260, load Text File with Python from GUI Button results in 0 User
1 changed files with 1 additions and 0 deletions

View File

@ -739,6 +739,7 @@ static int editsource_text_edit(
if (text == NULL) {
text = BKE_text_load(bmain, filepath, bmain->name);
id_us_ensure_real(&text->id);
}
if (text == NULL) {