From a1f744cb07d006e2b8f02fbab94e5d94c09e8361 Mon Sep 17 00:00:00 2001 From: reimar Date: Tue, 1 Sep 2009 15:20:05 +0000 Subject: 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 --- libvo/vo_gl2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libvo/vo_gl2.c') diff --git a/libvo/vo_gl2.c b/libvo/vo_gl2.c index 654b34942a..a5e6050f44 100644 --- a/libvo/vo_gl2.c +++ b/libvo/vo_gl2.c @@ -637,7 +637,8 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin #endif return -1; - setGlWindow(&gl_vinfo, &gl_context, vo_window); + if (setGlWindow(&gl_vinfo, &gl_context, vo_window) == SET_WINDOW_FAILED) + return -1; glVersion = glGetString(GL_VERSION); -- cgit v1.2.3