summaryrefslogtreecommitdiff
path: root/modules/gdscript
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdscript')
-rw-r--r--modules/gdscript/register_types.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/modules/gdscript/register_types.cpp b/modules/gdscript/register_types.cpp
index 9b55e99282..58b438092d 100644
--- a/modules/gdscript/register_types.cpp
+++ b/modules/gdscript/register_types.cpp
@@ -161,13 +161,9 @@ void unregister_gdscript_types() {
if (script_language_gd)
memdelete(script_language_gd);
- if (resource_loader_gd.is_valid()) {
- ResourceLoader::remove_resource_format_loader(resource_loader_gd);
- resource_loader_gd.unref();
- }
+ ResourceLoader::remove_resource_format_loader(resource_loader_gd);
+ resource_loader_gd.unref();
- if (resource_saver_gd.is_valid()) {
- ResourceSaver::remove_resource_format_saver(resource_saver_gd);
- resource_saver_gd.unref();
- }
+ ResourceSaver::remove_resource_format_saver(resource_saver_gd);
+ resource_saver_gd.unref();
}