diff --git a/src/backends/x11/meta-gpu-xrandr.c b/src/backends/x11/meta-gpu-xrandr.c index 404629024..f8f4b1a73 100644 --- a/src/backends/x11/meta-gpu-xrandr.c +++ b/src/backends/x11/meta-gpu-xrandr.c @@ -92,12 +92,12 @@ calculate_xrandr_refresh_rate (XRRModeInfo *xmode) float h_total; float v_total; + if (xmode->hTotal == 0 || xmode->vTotal == 0) + return 0.0; + h_total = (float) xmode->hTotal; v_total = (float) xmode->vTotal; - if (h_total == 0.0 || v_total == 0.0) - return 0.0; - if (xmode->modeFlags & RR_DoubleScan) v_total *= 2.0;