[Bf-blender-cvs] [57fa10ed98b] cycles_oneapi: Cleanup: Use assert instead of early exit for asset dragging internals
Julian Eisel
noreply at git.blender.org
Wed Jun 29 10:38:36 CEST 2022
Commit: 57fa10ed98bac6606a9285c5967b701411b9126e
Author: Julian Eisel
Date: Mon Jun 27 15:32:56 2022 +0200
Branches: cycles_oneapi
https://developer.blender.org/rB57fa10ed98bac6606a9285c5967b701411b9126e
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