catch DIV by 0 for 0 dimension from modeline

BUG :313996
This commit is contained in:
Thomas Lübking 2013-01-27 21:23:57 +01:00
parent bf2776b42f
commit 929fb3c508

View file

@ -72,7 +72,8 @@ int currentRefreshRate()
dotclock *= 2;
if (modeline.flags & 0x0020) // V_DBLSCAN
vtotal *= 2;
rate = 1000*dotclock/(modeline.htotal*vtotal); // WTF was wikipedia 1998 when I nedded it?
if (modeline.htotal*vtotal) // BUG 313996
rate = 1000*dotclock/(modeline.htotal*vtotal); // WTF was wikipedia 1998 when I nedded it?
kDebug(1212) << "Vertical Refresh Rate (as detected by XF86VM): " << rate << "Hz";
}
}