From 929fb3c50849f8c0950994e08d473208b5d8938e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Sun, 27 Jan 2013 21:23:57 +0100 Subject: [PATCH] catch DIV by 0 for 0 dimension from modeline BUG :313996 --- options.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/options.cpp b/options.cpp index a49ff922c2..a3c20e4ce8 100644 --- a/options.cpp +++ b/options.cpp @@ -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"; } }