mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 15:21:56 -05:00
Fix crash when dumping extension API in a non-writable directory
This commit is contained in:
@@ -1052,6 +1052,7 @@ void GDExtensionAPIDump::generate_extension_json_file(const String &p_path) {
|
||||
|
||||
String text = json->stringify(api, "\t", false) + "\n";
|
||||
Ref<FileAccess> fa = FileAccess::open(p_path, FileAccess::WRITE);
|
||||
ERR_FAIL_COND_MSG(fa.is_null(), vformat("Cannot open file '%s' for writing.", p_path));
|
||||
fa->store_string(text);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user