summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-05-16 08:41:20 +0200
committerGitHub <noreply@github.com>2019-05-16 08:41:20 +0200
commit978d71b8393ec425830ba48253dca4f32484edd1 (patch)
treeb1cd4be9c7b9f17d01462347946d59d96fc4aaef
parent66937c1e8298c3fb03a048818a0633561217641f (diff)
parenta4a0e642456f80b71a6383f7fccd5ea93c07c2ea (diff)
Merge pull request #28924 from fsecilia/master
Fix indexing failure in unregister_binding_functions.
-rw-r--r--modules/gdnative/nativescript/nativescript.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdnative/nativescript/nativescript.cpp b/modules/gdnative/nativescript/nativescript.cpp
index 5cf144d4fe..04ba28dc68 100644
--- a/modules/gdnative/nativescript/nativescript.cpp
+++ b/modules/gdnative/nativescript/nativescript.cpp
@@ -1309,7 +1309,7 @@ void NativeScriptLanguage::unregister_binding_functions(int p_idx) {
for (Set<Vector<void *> *>::Element *E = binding_instances.front(); E; E = E->next()) {
Vector<void *> &binding_data = *E->get();
- if (binding_data[p_idx] && binding_functions[p_idx].second.free_instance_binding_data)
+ if (p_idx < binding_data.size() && binding_data[p_idx] && binding_functions[p_idx].second.free_instance_binding_data)
binding_functions[p_idx].second.free_instance_binding_data(binding_functions[p_idx].second.data, binding_data[p_idx]);
}