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>2022-06-27 16:32:56 +0300
committerJulian Eisel <julian@blender.org>2022-06-27 16:36:25 +0300
commit83c2cbb880c0292e3bf01a34eb92a953d1359955 (patch)
tree6b9a86f820238a78f0f51db50c694de5eda524f3 /source/blender/windowmanager
parent36f5967b9998fcb28829091608db504de166dd5b (diff)
Cleanup: Use assert instead of early exit for asset dragging internals
Instead of failing silently, throw a failed assert in debug builds.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_dragdrop.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_dragdrop.c b/source/blender/windowmanager/intern/wm_dragdrop.c
index 09ef4e15012..546ba795892 100644
--- a/source/blender/windowmanager/intern/wm_dragdrop.c
+++ b/source/blender/windowmanager/intern/wm_dragdrop.c
@@ -712,9 +712,7 @@ void WM_drag_add_asset_list_item(
const AssetLibraryReference *asset_library_ref,
const AssetHandle *asset)
{
- if (drag->type != WM_DRAG_ASSET_LIST) {
- return;
- }
+ BLI_assert(drag->type == WM_DRAG_ASSET_LIST);
/* No guarantee that the same asset isn't added twice. */