summaryrefslogtreecommitdiffstats
path: root/core/math
diff options
context:
space:
mode:
Diffstat (limited to 'core/math')
-rw-r--r--core/math/disjoint_set.h2
-rw-r--r--core/math/dynamic_bvh.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/math/disjoint_set.h b/core/math/disjoint_set.h
index 78ae77e72c..2ece991fea 100644
--- a/core/math/disjoint_set.h
+++ b/core/math/disjoint_set.h
@@ -134,7 +134,7 @@ void DisjointSet<T, H, C, AL>::get_representatives(Vector<T> &out_representative
template <typename T, class H, class C, class AL>
void DisjointSet<T, H, C, AL>::get_members(Vector<T> &out_members, T representative) {
typename MapT::Iterator rep_itr = elements.find(representative);
- ERR_FAIL_COND(rep_itr == nullptr);
+ ERR_FAIL_NULL(rep_itr);
Element *rep_element = rep_itr->value;
ERR_FAIL_COND(rep_element->parent != rep_element);
diff --git a/core/math/dynamic_bvh.h b/core/math/dynamic_bvh.h
index 21b5340aaa..dbc1cb31de 100644
--- a/core/math/dynamic_bvh.h
+++ b/core/math/dynamic_bvh.h
@@ -190,7 +190,7 @@ private:
_FORCE_INLINE_ bool is_internal() const { return (!is_leaf()); }
_FORCE_INLINE_ int get_index_in_parent() const {
- ERR_FAIL_COND_V(!parent, 0);
+ ERR_FAIL_NULL_V(parent, 0);
return (parent->children[1] == this) ? 1 : 0;
}
void get_max_depth(int depth, int &maxdepth) {