Core: Handle disabled class detection in ClassDB
This commit is contained in:
@ -45,7 +45,7 @@ void initialize_dds_module(ModuleInitializationLevel p_level) {
|
||||
Image::save_dds_func = save_dds;
|
||||
Image::save_dds_buffer_func = save_dds_buffer;
|
||||
|
||||
if (GD_IS_CLASS_ENABLED(Texture)) {
|
||||
if constexpr (GD_IS_CLASS_ENABLED(Texture)) {
|
||||
resource_loader_dds.instantiate();
|
||||
ResourceLoader::add_resource_format_loader(resource_loader_dds);
|
||||
}
|
||||
@ -56,7 +56,7 @@ void uninitialize_dds_module(ModuleInitializationLevel p_level) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (GD_IS_CLASS_ENABLED(Texture)) {
|
||||
if constexpr (GD_IS_CLASS_ENABLED(Texture)) {
|
||||
ResourceLoader::remove_resource_format_loader(resource_loader_dds);
|
||||
resource_loader_dds.unref();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user