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:
authorBastien Montagne <montagne29@wanadoo.fr>2014-06-30 21:34:52 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2014-06-30 21:37:36 +0400
commited871df83686aebd12292828d6f889baf14ece72 (patch)
tree86edd731a3ec804e66172e6f6a437aa5b890a227 /source
parent320b7a59c3eed976328544bb401527f9b43d6987 (diff)
Fix odd situation where you could assign a background image without increasing its usercount.
Probably a leftover from old code, I don't think this invoke usage of VIEW3D_OT_background_image_add was actually reachable anywhere from the UI, but managed to get it working from py, without increasing user count...
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index aedbca4b8cd..f49a7383715 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -4221,8 +4221,7 @@ static int background_image_add_invoke(bContext *C, wmOperator *op, const wmEven
if (ima) {
bgpic->ima = ima;
- if (ima->id.us == 0) id_us_plus(&ima->id);
- else id_lib_extern(&ima->id);
+ id_us_plus(&ima->id);
if (!(v3d->flag & V3D_DISPBGPICS))
v3d->flag |= V3D_DISPBGPICS;