Merge pull request #87938 from tishin/fix-gdextension-deinit

Add null check for GDExtension deinitialization
This commit is contained in:
Rémi Verschelde 2024-02-05 14:53:00 +01:00
commit f4f1398503
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 3 additions and 0 deletions

View File

@ -794,6 +794,9 @@ void GDExtension::deinitialize_library(InitializationLevel p_level) {
ERR_FAIL_COND(p_level > int32_t(level_initialized));
level_initialized = int32_t(p_level) - 1;
ERR_FAIL_NULL(initialization.deinitialize);
initialization.deinitialize(initialization.userdata, GDExtensionInitializationLevel(p_level));
}