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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-11-18 22:20:02 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-11-18 22:24:21 +0300
commit24a387d6ff515abcf47d7ad61d4faa9a589bd1a9 (patch)
treeadd4bc709b3decb7d424c5646f48855861594d2d /source/blender/makesrna/intern/rna_main_api.c
parent0639ba8ea58bc775bfa3436e1ba9831ece78404d (diff)
Fix T46807: image/clip/sound load has one user
Loading data from Python gave it one user (unlike 'new' which has zero).
Diffstat (limited to 'source/blender/makesrna/intern/rna_main_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_main_api.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c
index 710ae97e4dc..de12257421d 100644
--- a/source/blender/makesrna/intern/rna_main_api.c
+++ b/source/blender/makesrna/intern/rna_main_api.c
@@ -369,6 +369,7 @@ static Image *rna_Main_images_load(Main *bmain, ReportList *reports, const char
errno ? strerror(errno) : TIP_("unsupported image format"));
}
+ id_us_min((ID *)ima);
return ima;
}
static void rna_Main_images_remove(Main *bmain, ReportList *reports, PointerRNA *image_ptr)
@@ -457,6 +458,7 @@ static VFont *rna_Main_fonts_load(Main *bmain, ReportList *reports, const char *
BKE_reportf(reports, RPT_ERROR, "Cannot read '%s': %s", filepath,
errno ? strerror(errno) : TIP_("unsupported font format"));
+ id_us_min((ID *)font);
return font;
}
@@ -710,6 +712,7 @@ static MovieClip *rna_Main_movieclip_load(Main *bmain, ReportList *reports, cons
BKE_reportf(reports, RPT_ERROR, "Cannot read '%s': %s", filepath,
errno ? strerror(errno) : TIP_("unable to load movie clip"));
+ id_us_min((ID *)clip);
return clip;
}