From 2a88281a616999ad98578c85f343df21de52ae27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Sat, 29 Sep 2007 14:06:19 +0000 Subject: [PATCH] * check for possible division by zero (just had a crash with divide error on another machine, don't know if this was really the cause, but it should be checked nevertheless I guess) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22373 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/accelerants/radeon/ProposeDisplayMode.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/add-ons/accelerants/radeon/ProposeDisplayMode.c b/src/add-ons/accelerants/radeon/ProposeDisplayMode.c index 46bcc76ddd..cec13c09f1 100644 --- a/src/add-ons/accelerants/radeon/ProposeDisplayMode.c +++ b/src/add-ons/accelerants/radeon/ProposeDisplayMode.c @@ -152,6 +152,9 @@ Radeon_ProposeDisplayMode(shared_info *si, crtc_info *crtc, SHOW_FLOW( 4, "X %d, virtX %d", target->timing.h_display, target->virtual_width); SHOW_FLOW( 4, "fpRes %dx%d", flatpanel->panel_xres, flatpanel->panel_yres); + if (target->timing.h_total * target->timing.v_total == 0) + return B_BAD_VALUE; + // save refresh rate - we want to leave this (artifical) value untouched // don't use floating point, we are in kernel mode target_refresh =