fix segv's in randr dialog. :)

SVN revision: 77943
This commit is contained in:
Carsten Haitzler 2012-10-13 03:18:58 +00:00
parent d421af2a0b
commit c824b1a1e1
1 changed files with 23 additions and 12 deletions

View File

@ -278,6 +278,8 @@ e_smart_monitor_info_set(Evas_Object *obj, E_Randr_Output_Info *output, E_Randr_
/* fill in list of modes */
_e_smart_monitor_modes_fill(sd);
if (sd->modes)
{
/* get the min resolution for this monitor */
mode = eina_list_nth(sd->modes, 0);
sd->min.w = mode->width;
@ -288,6 +290,7 @@ e_smart_monitor_info_set(Evas_Object *obj, E_Randr_Output_Info *output, E_Randr_
sd->max.w = mode->width;
sd->max.h = mode->height;
if (!crtc) sd->orig.mode = mode;
}
/* set monitor name */
if (output)
@ -414,10 +417,18 @@ e_smart_monitor_crtc_geometry_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y
if (h) *h = crtc->geometry.h;
}
else
{
if (sd->current.mode)
{
if (w) *w = sd->current.mode->width;
if (h) *h = sd->current.mode->height;
}
else
{
if (w) *w = 640;
if (h) *h = 640;
}
}
}
else
{