Skip to content

Commit d6aefc6

Browse files
committed
FLACDecoderFoxen NPE
1 parent c2cad3d commit d6aefc6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/AudioTools/AudioCodecs/CodecFLACFoxen.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ class FLACDecoderFoxen : public AudioDecoder {
5959

6060
void end() {
6161
TRACEI();
62-
flush();
6362
if (flac != nullptr) {
63+
flush();
6464
foxen_data.resize(0);
6565
flac = nullptr;
6666
}
@@ -136,6 +136,7 @@ class FLACDecoderFoxen : public AudioDecoder {
136136

137137
bool decode() {
138138
TRACED();
139+
if (flac == nullptr) return false;
139140
uint32_t out_len = out.size();
140141
uint32_t buf_len = buffer.available();
141142
uint32_t buf_len_result = buf_len;

0 commit comments

Comments
 (0)