Fix crash: mouse is over file space during startup.
When blender starts and the mouse is over a file/asset browser it crashes. This is because blender wants to highlight a file, but the layout isn't initialized yet.
This commit is contained in:
parent
895d3cd11e
commit
aab7540b7a
|
@ -1366,7 +1366,9 @@ int file_highlight_set(SpaceFile *sfile, ARegion *region, int mx, int my)
|
|||
FileSelectParams *params;
|
||||
int numfiles, origfile;
|
||||
|
||||
if (sfile == NULL || sfile->files == NULL) {
|
||||
/* In case blender starts where the mouse is over a File broser, this operator can be invoked
|
||||
* when the sfile or sfile->layout isn't initialized yet. */
|
||||
if (sfile == NULL || sfile->files == NULL || sfile->layout == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue