You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-05 19:31:35 +00:00
Merge pull request #100422 from hpvb/from-the-depth-of-despair
Fix a crash trying to save an empty AudioStream
This commit is contained in:
@@ -587,7 +587,7 @@ void AudioStreamWAV::set_data(const Vector<uint8_t> &p_data) {
|
||||
Vector<uint8_t> AudioStreamWAV::get_data() const {
|
||||
Vector<uint8_t> pv;
|
||||
|
||||
if (!data.is_empty()) {
|
||||
if (data_bytes) {
|
||||
pv.resize(data_bytes);
|
||||
memcpy(pv.ptrw(), data.ptr() + DATA_PAD, data_bytes);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user