[Bf-blender-cvs] [83c2cbb880c] master: Cleanup: Use assert instead of early exit for asset dragging internals
Julian Eisel
noreply at git.blender.org
Mon Jun 27 15:36:31 CEST 2022
Commit: 83c2cbb880c0292e3bf01a34eb92a953d1359955
Author: Julian Eisel
Date: Mon Jun 27 15:32:56 2022 +0200
Branches: master
https://developer.blender.org/rB83c2cbb880c0292e3bf01a34eb92a953d1359955
Cleanup: Use assert instead of early exit for asset dragging internals
Instead of failing silently, throw a failed assert in debug builds.
===================================================================
M source/blender/windowmanager/intern/wm_dragdrop.c
===================================================================
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. */
More information about the Bf-blender-cvs
mailing list