summaryrefslogtreecommitdiff
path: root/modules/theora
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-01-10 12:45:57 +0100
committerRémi Verschelde <rverschelde@gmail.com>2019-01-10 12:45:57 +0100
commite5f1d19352dbaafab96538b91fad0ce11cf0d046 (patch)
treec3cf72310e91ced0bd739b61d1d3197df78c1313 /modules/theora
parent940a2c5ec3e13d57c6462b7070eb3101766c91db (diff)
Consistency in resource format saver/loader de-registration
Some used 'is_valid()' checks, others not. Validity is already checked in 'unref()', and 'remove_resource_format_*()' has an ERR_FAIL condition on 'is_null()' already (which shouldn't happen since we're only unregistering things that we previously registered. Also add missing GDCLASS statement in ResourceFormatLoaderVideoStreamGDNative, missed in #20552 which was last amended before #19501 was merged.
Diffstat (limited to 'modules/theora')
-rw-r--r--modules/theora/register_types.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/modules/theora/register_types.cpp b/modules/theora/register_types.cpp
index 894952985e..4b50c3f146 100644
--- a/modules/theora/register_types.cpp
+++ b/modules/theora/register_types.cpp
@@ -45,8 +45,5 @@ void register_theora_types() {
void unregister_theora_types() {
ResourceLoader::remove_resource_format_loader(resource_loader_theora);
-
- if (resource_loader_theora.is_valid()) {
- resource_loader_theora.unref();
- }
+ resource_loader_theora.unref();
}