V_CheckGamma WILL get called before vid_gamma gets set in gl, so protect

against that circumstance.
This commit is contained in:
Bill Currie 2001-04-14 02:27:19 +00:00
parent fa99cb304b
commit 8fef64c064

View file

@ -272,10 +272,12 @@ V_CheckGamma (void)
{
static float oldgamma;
if (oldgamma == vid_gamma->value)
return false;
if (vid_gamma) { // might get called before vid_gamma gets set
if (oldgamma == vid_gamma->value)
return false;
oldgamma = vid_gamma->value;
oldgamma = vid_gamma->value;
}
vid.recalc_refdef = 1; // force a surface cache flush