From: divverent Date: Thu, 19 Apr 2012 19:52:58 +0000 (+0000) Subject: handle the unlikely case of qglXSwapIntervalSGI becoming invalid after GL restart... X-Git-Tag: xonotic-v0.7.0~151 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c017de26a4650cbaf220f82c7ca3b8c3e8be94ba;p=xonotic%2Fdarkplaces.git handle the unlikely case of qglXSwapIntervalSGI becoming invalid after GL restart (found by clang-analyzer) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11802 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=d8dc612f3020e9d9f5f5209e1e6584d9a9a448d8 --- diff --git a/vid_glx.c b/vid_glx.c index 9ac4e02f..5b77483f 100644 --- a/vid_glx.c +++ b/vid_glx.c @@ -936,7 +936,7 @@ void VID_Finish (void) if (vid_usingvsync != vid_usevsync) { vid_usingvsync = vid_usevsync; - if (qglXSwapIntervalSGI (vid_usevsync)) + if (qglXSwapIntervalSGI && qglXSwapIntervalSGI (vid_usevsync)) Con_Print("glXSwapIntervalSGI didn't accept the vid_vsync change, it will take effect on next vid_restart (GLX_SGI_swap_control does not allow turning off vsync)\n"); }