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.
This commit is contained in:
@ -1900,6 +1900,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