diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index bcfa4dfc0a..a25c3d955c 100644 --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@ -5484,7 +5484,7 @@ static int vc1_decode_sprites(VC1Context *v, GetBitContext* gb) if (ret < 0) return ret; - if (!s->current_picture.f->data[0]) { + if (!s->current_picture.f || !s->current_picture.f->data[0]) { av_log(avctx, AV_LOG_ERROR, "Got no sprites\n"); return -1; }