diff options
author | wm4 <wm4@nowhere> | 2012-08-16 16:21:51 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-08-16 17:16:32 +0200 |
commit | 4672ff39ddb163c6512985858de4a11f673b6c7b (patch) | |
tree | 51006e66b95088388c1bdff374c412517110a309 | |
parent | 1b7b0c93a875d76573cc44bb0fe92e7bd5a7a366 (diff) | |
download | mpv-4672ff39ddb163c6512985858de4a11f673b6c7b.tar.bz2 mpv-4672ff39ddb163c6512985858de4a11f673b6c7b.tar.xz |
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.
-rw-r--r-- | libvo/vo_vdpau.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |