summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorsten Jager <t.jager@gmx.de>2013-08-22 16:48:45 +0200
committerTorsten Jager <t.jager@gmx.de>2013-08-22 16:48:45 +0200
commitd197f2cb5d6982a05c2a56f27995dcbd14d2ef08 (patch)
tree7bb604832045d7ff0abccae3b96f5b97365878e9
parent9b32b98fac1724ffa63bb29428abedfb1830a5d6 (diff)
downloadxine-lib-d197f2cb5d6982a05c2a56f27995dcbd14d2ef08.tar.gz
xine-lib-d197f2cb5d6982a05c2a56f27995dcbd14d2ef08.tar.bz2
video_out_opengl2: skip rendering into invalid drawable
Tested by provoking a Kaffeine segfault.
-rw-r--r--src/video_out/video_out_opengl2.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/video_out/video_out_opengl2.c b/src/video_out/video_out_opengl2.c
index fed693af0..aadfca107 100644
--- a/src/video_out/video_out_opengl2.c
+++ b/src/video_out/video_out_opengl2.c
@@ -1158,7 +1158,10 @@ static void opengl2_draw_video_bilinear( opengl2_driver_t *that, int guiw, int g
static void opengl2_draw( opengl2_driver_t *that, opengl2_frame_t *frame )
{
- glXMakeCurrent( that->display, that->drawable, that->context );
+ if ( !glXMakeCurrent( that->display, that->drawable, that->context ) ) {
+ xprintf( that->xine, XINE_VERBOSITY_LOG, "video_out_opengl2: display unavailable for rendering\n" );
+ return;
+ }
if ( !opengl2_check_textures_size( that, frame->width, frame->height ) ) {
glXMakeCurrent( that->display, None, NULL );