Просмотр исходного кода

Merge pull request #47623 from Bromeon/bugfix/gdnative-cleanup

Fix error in the console: `double free or corruption (!prev)` at exit of GDnative C++ application
Rémi Verschelde 4 лет назад
Родитель
Сommit
07d26edafc
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      modules/gdnative/nativescript/nativescript.cpp

+ 2 - 0
modules/gdnative/nativescript/nativescript.cpp

@@ -1759,6 +1759,8 @@ void NativeScriptLanguage::unregister_script(NativeScript *script) {
 						C->get().destroy_func.free_func(C->get().destroy_func.method_data);
 					}
 				}
+
+				library_classes.erase(script->lib_path);
 			}
 
 			Map<String, Ref<GDNative>>::Element *G = library_gdnatives.find(script->lib_path);