Fix T46544: Can't unpack generated image
This commit is contained in:
parent
24cc885057
commit
e96411aaad
Notes:
blender-bot
2023-02-14 10:21:10 +01:00
Referenced by issue #46544, Can't unpack generated image
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue