diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-09-01 15:20:05 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-09-01 15:20:05 +0000 |
commit | a1f744cb07d006e2b8f02fbab94e5d94c09e8361 (patch) | |
tree | 778cbc7f8c9cb58c42ff2d0690b8b60e634b9efa /libvo/vo_gl.c | |
parent | 986499e97ed60c3941d6c1bdd6317dbd86e3da9b (diff) | |
download | mpv-a1f744cb07d006e2b8f02fbab94e5d94c09e8361.tar.bz2 mpv-a1f744cb07d006e2b8f02fbab94e5d94c09e8361.tar.xz |
Check setGlWindow return value to fail properly instead of crashing if e.g.
no OpenGL support is available.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29612 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vo_gl.c')
-rw-r--r-- | libvo/vo_gl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index a281611c4c..efeef5c02f 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -571,7 +571,8 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin glconfig: if (vo_config_count) uninitGl(); - setGlWindow(&gl_vinfo, &gl_context, vo_window); + if (setGlWindow(&gl_vinfo, &gl_context, vo_window) == SET_WINDOW_FAILED) + return -1; initGl(vo_dwidth, vo_dheight); return 0; |