diff options
Diffstat (limited to 'core/object/class_db.cpp')
-rw-r--r-- | core/object/class_db.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/object/class_db.cpp b/core/object/class_db.cpp index 100cb8e6a2..6a6043e42d 100644 --- a/core/object/class_db.cpp +++ b/core/object/class_db.cpp @@ -221,10 +221,11 @@ uint32_t ClassDB::get_api_hash(APIType p_api) { hash = hash_murmur3_one_64(mb->get_default_argument_count(), hash); - for (int i = 0; i < mb->get_default_argument_count(); i++) { - //hash should not change, i hope for tis - Variant da = mb->get_default_argument(i); - hash = hash_murmur3_one_64(da.hash(), hash); + for (int i = 0; i < mb->get_argument_count(); i++) { + if (mb->has_default_argument(i)) { + Variant da = mb->get_default_argument(i); + hash = hash_murmur3_one_64(da.hash(), hash); + } } hash = hash_murmur3_one_64(mb->get_hint_flags(), hash); |