mirror of
https://github.com/godotengine/godot.git
synced 2025-01-22 10:32:54 -05: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:
commit
7b90590e85
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue