summaryrefslogtreecommitdiffstats
path: root/servers/rendering/renderer_rd/storage_rd/utilities.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-09-26 13:45:31 +0200
committerRémi Verschelde <rverschelde@gmail.com>2023-09-26 13:45:31 +0200
commit2c8c7b95aa93d0e777c2a28ddb759546819e4470 (patch)
tree30b5999a727b4ef63959a9156c5b4c5122bc5f7a /servers/rendering/renderer_rd/storage_rd/utilities.cpp
parenta4bca123363063551676f2b35578a45391845a3a (diff)
parentfdd3d36c6d09923f4e458d4526a7b968e7e026d8 (diff)
downloadredot-engine-2c8c7b95aa93d0e777c2a28ddb759546819e4470.tar.gz
Merge pull request #82313 from AThousandShips/null_check_servers
[Servers] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable
Diffstat (limited to 'servers/rendering/renderer_rd/storage_rd/utilities.cpp')
-rw-r--r--servers/rendering/renderer_rd/storage_rd/utilities.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/servers/rendering/renderer_rd/storage_rd/utilities.cpp b/servers/rendering/renderer_rd/storage_rd/utilities.cpp
index cabac4e9ee..8df14d04db 100644
--- a/servers/rendering/renderer_rd/storage_rd/utilities.cpp
+++ b/servers/rendering/renderer_rd/storage_rd/utilities.cpp
@@ -175,27 +175,27 @@ void Utilities::visibility_notifier_free(RID p_notifier) {
void Utilities::visibility_notifier_set_aabb(RID p_notifier, const AABB &p_aabb) {
VisibilityNotifier *vn = visibility_notifier_owner.get_or_null(p_notifier);
- ERR_FAIL_COND(!vn);
+ ERR_FAIL_NULL(vn);
vn->aabb = p_aabb;
vn->dependency.changed_notify(Dependency::DEPENDENCY_CHANGED_AABB);
}
void Utilities::visibility_notifier_set_callbacks(RID p_notifier, const Callable &p_enter_callbable, const Callable &p_exit_callable) {
VisibilityNotifier *vn = visibility_notifier_owner.get_or_null(p_notifier);
- ERR_FAIL_COND(!vn);
+ ERR_FAIL_NULL(vn);
vn->enter_callback = p_enter_callbable;
vn->exit_callback = p_exit_callable;
}
AABB Utilities::visibility_notifier_get_aabb(RID p_notifier) const {
const VisibilityNotifier *vn = visibility_notifier_owner.get_or_null(p_notifier);
- ERR_FAIL_COND_V(!vn, AABB());
+ ERR_FAIL_NULL_V(vn, AABB());
return vn->aabb;
}
void Utilities::visibility_notifier_call(RID p_notifier, bool p_enter, bool p_deferred) {
VisibilityNotifier *vn = visibility_notifier_owner.get_or_null(p_notifier);
- ERR_FAIL_COND(!vn);
+ ERR_FAIL_NULL(vn);
if (p_enter) {
if (!vn->enter_callback.is_null()) {