MonitorXrandr: Fix segv when accessing possible_clones

This code requires a double pass and the segv happens later
when trying to iterate over the array.

https://bugzilla.gnome.org/show_bug.cgi?id=706598
This commit is contained in:
Colin Guthrie 2013-08-22 17:39:56 +01:00 committed by Giovanni Campagna
parent 2af20b77b6
commit 5de346bfef

View File

@ -532,7 +532,7 @@ meta_monitor_manager_xrandr_read_current (MetaMonitorManager *manager)
*/
for (j = 0; j < (unsigned)output->nclone; j++)
{
meta_output->possible_clones = GINT_TO_POINTER (output->clones[j]);
meta_output->possible_clones[j] = GINT_TO_POINTER (output->clones[j]);
}
meta_output->is_primary = ((XID)meta_output->output_id == primary_output);