Commit: aab7540b7a4460fdc414857493fa1c6cc5d7d972
Author: Jeroen Bakker
Date: Tue Aug 10 12:00:27 2021 +0200
Branches: master
https://developer.blender.org/rBaab7540b7a4460fdc414857493fa1c6cc5d7d972
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.
===================================================================
M source/blender/editors/space_file/file_ops.c
===================================================================
diff --git a/source/blender/editors/space_file/file_ops.c
b/source/blender/editors/space_file/file_ops.c
index 944eb9988fa..c7e5f744455 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -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;
}
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs