Fix 48831, Step I: Mismatch issues bewteen ID icon and preview system.

- icon_id from ID and PreviewImage were not guaranteed to be in sync.
- PreviewImage one was not reset on file read.
- Through RNA e.g., it was possible to ensure an ID icon via its preview image,
  which was running code designed for custom previews/icons system, instead
  of generating correct 'auto ID icon'.
This commit is contained in:
2016-07-12 17:49:30 +02:00
parent 5fae2503bf
commit 51812fb502
4 changed files with 46 additions and 16 deletions

View File

@@ -2144,6 +2144,7 @@ static PreviewImage *direct_link_preview_image(FileData *fd, PreviewImage *old_p
}
prv->gputexture[i] = NULL;
}
prv->icon_id = 0;
}
return prv;