From 4672ff39ddb163c6512985858de4a11f673b6c7b Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 16 Aug 2012 16:21:51 +0200 Subject: vo_vdpau: fix crash when vo_vdpau initialization fails This happened on system without a vdpau driver installed. It's especially bad because vdpau is the default VO. I'm not sure when this bug was introduced, and it seems to exist in upstream mplayer2 too. --- libvo/vo_vdpau.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libvo') diff --git a/libvo/vo_vdpau.c b/libvo/vo_vdpau.c index d220762d8d..52e7abaa0c 100644 --- a/libvo/vo_vdpau.c +++ b/libvo/vo_vdpau.c @@ -1505,7 +1505,7 @@ static int preinit(struct vo *vo, const char *arg) // After this calling uninit() should work to free resources if (win_x11_init_vdpau_procs(vo) < 0) { - if (vc->vdp->device_destroy) + if (vc->vdp && vc->vdp->device_destroy) vc->vdp->device_destroy(vc->vdp_device); vo_x11_uninit(vo); return -1; -- cgit v1.2.3