From 865796375bcfa6be4288cca4243dddcb4092f70b Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 9 Nov 2015 19:47:10 +0100 Subject: Cleanup: avoid incrementing/decrementing id->us outside of BKE_library. We have callbacks for that, they also do some checks and help ensure things are done correctly. Only place where this is assumed not true is blenloader (since here we may affect refcount of library IDs as well...). --- source/blender/blenkernel/intern/sound.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenkernel/intern/sound.c') diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index 7e7cc8745fd..69f4dbcd502 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -106,7 +106,7 @@ bSound *BKE_sound_new_file_exists_ex(struct Main *bmain, const char *filepath, b BLI_path_abs(strtest, ID_BLEND_PATH(bmain, &sound->id)); if (BLI_path_cmp(strtest, str) == 0) { - sound->id.us++; /* officially should not, it doesn't link here! */ + id_us_plus(&sound->id); /* officially should not, it doesn't link here! */ if (r_exists) *r_exists = true; return sound; -- cgit v1.2.3