E (RandR): Make sure we have hTotal and vTotal from the mode before
authorChristopher Michael <cp.michael@samsung.com>
Wed, 10 Oct 2012 10:10:25 +0000 (10:10 +0000)
committerChristopher Michael <cpmichael1@comcast.net>
Wed, 10 Oct 2012 10:10:25 +0000 (10:10 +0000)
trying to calculate refresh rate.

Signed-off-by: Christopher Michael <cp.michael@samsung.com>
SVN revision: 77743

src/modules/conf_randr/e_smart_monitor.c

index 1e2043ba5c8a2d304ecad5e3e09ee69a39598b31..cbeca78ca8e276e94cf2f244f23d746aa05367de 100644 (file)
@@ -203,8 +203,9 @@ e_smart_monitor_crtc_set(Evas_Object *obj, E_Randr_Crtc_Info *crtc)
    sd->rotation = _e_smart_monitor_rotation_get(sd->orientation);
    sd->mode = crtc->current_mode;
 
-   sd->rate = (int)((float)sd->mode->dotClock / 
-                    ((float)sd->mode->hTotal * (float)sd->mode->vTotal));
+   if ((sd->mode->hTotal) && (sd->mode->vTotal))
+     sd->rate = (int)((float)sd->mode->dotClock / 
+                      ((float)sd->mode->hTotal * (float)sd->mode->vTotal));
 
    EINA_LIST_FOREACH(crtc->outputs, l, output)
      {