diff options
author | Furkan Türkal <furkan.turkal@hotmail.com> | 2019-06-22 15:52:51 +0300 |
---|---|---|
committer | Furkan Türkal <furkan.turkal@hotmail.com> | 2019-07-01 14:28:29 +0300 |
commit | 7d8d337b2c47df88498067ff9091386691242144 (patch) | |
tree | 50dc0cb8fa683586cc947a2994fe48b45bba91b8 /servers/audio/effects | |
parent | 30383a1cdc00d398349515b81a85fa1d3da7ae37 (diff) |
fix some crashes
Diffstat (limited to 'servers/audio/effects')
-rw-r--r-- | servers/audio/effects/audio_effect_record.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/servers/audio/effects/audio_effect_record.cpp b/servers/audio/effects/audio_effect_record.cpp index abf9d5593c..acf27d2bbf 100644 --- a/servers/audio/effects/audio_effect_record.cpp +++ b/servers/audio/effects/audio_effect_record.cpp @@ -216,6 +216,9 @@ Ref<AudioStreamSample> AudioEffectRecord::get_recording() const { PoolVector<uint8_t> dst_data; + ERR_FAIL_COND_V(current_instance.is_null(), NULL); + ERR_FAIL_COND_V(current_instance->recording_data.size(), NULL); + if (dst_format == AudioStreamSample::FORMAT_8_BITS) { int data_size = current_instance->recording_data.size(); dst_data.resize(data_size); |