Don't restore gamma if it's never been initialized. :)

This commit is contained in:
Jeff Teunissen 2002-04-28 09:03:50 +00:00
parent ff901a312f
commit 2711cbbe7c

View file

@ -787,7 +787,7 @@ X11_RestoreGamma (void)
# ifdef X_XF86VidModeSetGamma
XF86VidModeGamma xgamma;
if (vid_gamma_avail) {
if (vid_gamma_avail && x_gamma[0] > 0) {
xgamma.red = x_gamma[0];
xgamma.green = x_gamma[1];
xgamma.blue = x_gamma[2];