aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder_api.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/decoder_api.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/decoder_api.c b/src/decoder_api.c
index f1ce0f5f7..7681b7b85 100644
--- a/src/decoder_api.c
+++ b/src/decoder_api.c
@@ -153,7 +153,8 @@ size_t decoder_read(struct decoder *decoder,
struct input_stream *is,
void *buffer, size_t length)
{
- const struct decoder_control *dc = decoder->dc;
+ const struct decoder_control *dc =
+ decoder != NULL ? decoder->dc : NULL;
size_t nbytes;
assert(decoder == NULL ||