Found-by: Daemon404
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
... | ... |
@@ -160,7 +160,7 @@ int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags) |
160 | 160 |
unsigned i, nb_planes = 0; |
161 | 161 |
int pixelstep[MAX_PLANES] = { 0 }; |
162 | 162 |
|
163 |
- if (!desc->name) |
|
163 |
+ if (!desc || !desc->name) |
|
164 | 164 |
return AVERROR(EINVAL); |
165 | 165 |
if (desc->flags & ~(AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_PSEUDOPAL | AV_PIX_FMT_FLAG_ALPHA)) |
166 | 166 |
return AVERROR(ENOSYS); |