mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Material Conversion Error Handling
Material Conversion Plugins now ERR_FAIL if called on an unitialized material.
FileSystemDock no longer crashes if Conversion Plugin fails and returns a null ref.
(cherry picked from commit 05fd79af7c)
This commit is contained in:
committed by
Thaddeus Crews
parent
3e17d7f028
commit
0af3765f77
@@ -1880,6 +1880,7 @@ void FileSystemDock::_convert_dialog_action() {
|
||||
for (const String &target : cached_valid_conversion_targets) {
|
||||
if (conversion_id == selected_conversion_id && conversion->converts_to() == target) {
|
||||
Ref<Resource> converted_res = conversion->convert(res);
|
||||
ERR_FAIL_COND(converted_res.is_null());
|
||||
ERR_FAIL_COND(res.is_null());
|
||||
converted_resources.push_back(converted_res);
|
||||
resources_to_erase_history_for.insert(res);
|
||||
|
||||
Reference in New Issue
Block a user