Fix T50900: Text-Blocks created from "Edit Source" have zero users.
authorBastien Montagne <montagne29@wanadoo.fr>
Fri, 10 Mar 2017 14:41:14 +0000 (15:41 +0100)
committerBastien Montagne <montagne29@wanadoo.fr>
Fri, 10 Mar 2017 14:43:33 +0000 (15:43 +0100)
source/blender/editors/interface/interface_ops.c

index 40ebc946e79d1e42366dd6b64a235c99408377a5..fb95cdf389bc621e009b8faacad2e628576726e7 100644 (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) {