diff options
Diffstat (limited to 'video/vdpau_mixer.c')
-rw-r--r-- | video/vdpau_mixer.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/video/vdpau_mixer.c b/video/vdpau_mixer.c index 1a53374622..2d60f32912 100644 --- a/video/vdpau_mixer.c +++ b/video/vdpau_mixer.c @@ -45,8 +45,10 @@ struct mp_image *mp_vdpau_mixed_frame_create(struct mp_image *base) frame->field = VDP_VIDEO_MIXER_PICTURE_STRUCTURE_FRAME; struct mp_image *mpi = mp_image_new_custom_ref(base, frame, free_mixed_frame); - mpi->planes[2] = (void *)frame; - mpi->planes[3] = (void *)(uintptr_t)VDP_INVALID_HANDLE; + if (mpi) { + mpi->planes[2] = (void *)frame; + mpi->planes[3] = (void *)(uintptr_t)VDP_INVALID_HANDLE; + } return mpi; } |