Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2021-07-30 16:54:54 +0300
committerJulian Eisel <julian@blender.org>2021-07-30 16:54:54 +0300
commiteb2a6f454bd07442d16001e25dcf407d4e8f7533 (patch)
tree9ad9b0edcd4e6f0522dd0fb2a847108a169d8322 /source/blender/windowmanager/WM_types.h
parent4647ffd918225452f25bd865a386e292ba7ebac8 (diff)
Fix T90318: Dragging asset while Asset Browser is still loading crashes
This partially reverts cb0b017d8f51: We can't store the asset handle in the drag data, because the file pointer it wraps may be freed as the Asset Browser generates its file list.
Diffstat (limited to 'source/blender/windowmanager/WM_types.h')
-rw-r--r--source/blender/windowmanager/WM_types.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h
index cc8fb307c92..4ead0b2699c 100644
--- a/source/blender/windowmanager/WM_types.h
+++ b/source/blender/windowmanager/WM_types.h
@@ -924,10 +924,13 @@ typedef struct wmDragID {
} wmDragID;
typedef struct wmDragAsset {
- /* Owning pointer. Contains the file with all the asset data (name, local ID, etc.) */
- struct AssetHandle *asset_handle;
+ /* Note: Can't store the AssetHandle here, since the FileDirEntry it wraps may be freed while
+ * dragging. So store necessary data here directly. */
+
+ char name[64]; /* MAX_NAME */
/* Always freed. */
const char *path;
+ int id_type;
int import_type; /* eFileAssetImportType */
} wmDragAsset;