Blender Git Loki

Git Commits -> Revision 5ce1c63

Revision 5ce1c63 by Julian Eisel (master)
December 9, 2021, 14:51 (GMT)
Fix T93691: Crash when loading custom thumbnail in custom library

This was an issue with the mixed list of external assets and assets from
the current file. When closing the File Browser to select the custom
preview image, the assets from the current file would be cleared for
reread, to make sure we display up-to-date file data. That is because
the workspace of the temporary File Browser was deleted, causing a
change in the file data (main data-base). The reread would happen in a
background thread, meaning it might not finish before the custom preview
operator runs and queries the active asset. So the preview operator
would get the wrong active asset from context.

Two fixes were needed:
* Make sure current file data is reread before the operator runs, by
doing this partial rereading on the main thread.
* Ensure the asset list (in fact file list) order stays consistent over
rereads. If multiple assets with the same name were shown, the
operator might also have gotten the wrong asset, also leading to a
crash.

Additionally the file operation handler should probably poll before
executing, to fail gracefully at least (not crash).

Commit Details:

Full Hash: 5ce1c63e1bf0f04509f08e835f8180fe2b4242ea
Parent Commit: 74fa4ee
Lines Changed: +60, -23

1 Modified Path:

/source/blender/editors/space_file/filelist.c (+60, -23) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021