You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-16 14:00:40 +00:00
Fix crash when dumping extension API in a non-writable directory
This commit is contained in:
@@ -27,6 +27,7 @@ class GDExtensionInterfaceDump {
|
||||
public:
|
||||
static void generate_gdextension_interface_file(const String &p_path) {
|
||||
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));
|
||||
CharString cs(gdextension_interface_dump);
|
||||
fa->store_buffer((const uint8_t *)cs.ptr(), cs.length());
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user