forked from enlightenment/enlightenment
E (RandR): Don't segfault if no current_mode is set for a monitor.
Signed-off-by: Christopher Michael <cp.michael@samsung.com> SVN revision: 77746
This commit is contained in:
parent
e6dc43325e
commit
9fa4848a0e
|
@ -228,11 +228,13 @@ e_smart_monitor_crtc_set(Evas_Object *obj, E_Randr_Crtc_Info *crtc)
|
|||
/* record the current rotation */
|
||||
sd->orientation = crtc->current_orientation;
|
||||
sd->rotation = _e_smart_monitor_rotation_get(sd->orientation);
|
||||
sd->mode = crtc->current_mode;
|
||||
|
||||
if ((sd->mode->hTotal) && (sd->mode->vTotal))
|
||||
sd->rate = (int)((float)sd->mode->dotClock /
|
||||
((float)sd->mode->hTotal * (float)sd->mode->vTotal));
|
||||
if ((sd->mode = crtc->current_mode))
|
||||
{
|
||||
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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue