monitor-manager: Initialize MetaOutput even when we can't get the EDID

Otherwise we'll crash later when building a MetaConfiguration.

https://bugzilla.gnome.org/show_bug.cgi?id=743412
This commit is contained in:
Rui Matos
2015-01-23 17:32:21 +01:00
parent 3356a43c04
commit ad90b7dd2f
3 changed files with 8 additions and 10 deletions

View File

@@ -1230,6 +1230,9 @@ meta_output_parse_edid (MetaOutput *meta_output,
MonitorInfo *parsed_edid;
gsize len;
if (!edid)
goto out;
parsed_edid = decode_edid (g_bytes_get_data (edid, &len));
if (parsed_edid)
@@ -1247,6 +1250,7 @@ meta_output_parse_edid (MetaOutput *meta_output,
g_free (parsed_edid);
}
out:
if (!meta_output->vendor)
{
meta_output->vendor = g_strdup ("unknown");