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-10-20 19:07:40 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-10-20 19:07:40 +0300
commite96411aaad14c7178081ce65563de8cb1fc5f168 (patch)
tree1da88f5e3c4d8a1beb543cf2230f9fd215725343
parent24cc88505749f222e93f224d8e5254798e03bb85 (diff)
Fix T46544: Can't unpack generated image
-rw-r--r--source/blender/blenkernel/intern/packedFile.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c
index 151889b10a1..a1669c745e6 100644
--- a/source/blender/blenkernel/intern/packedFile.c
+++ b/source/blender/blenkernel/intern/packedFile.c
@@ -582,7 +582,7 @@ int unpackImage(ReportList *reports, Image *ima, int how)
{
int ret_value = RET_ERROR;
- if (ima != NULL && ima->name[0]) {
+ if (ima != NULL) {
while (ima->packedfiles.last) {
char localname[FILE_MAX], absname[FILE_MAX];
char *newname;
@@ -605,7 +605,9 @@ int unpackImage(ReportList *reports, Image *ima, int how)
}
/* keep the new name in the image for non-pack specific reasons */
- BLI_strncpy(ima->name, newname, sizeof(imapf->filepath));
+ if (how != PF_REMOVE) {
+ BLI_strncpy(ima->name, newname, sizeof(imapf->filepath));
+ }
MEM_freeN(newname);
}
else {