egl-kms: append output after we know we found it

Otherwise we just append NULL output which is wrong and can
break things

Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>

https://bugzilla.gnome.org/show_bug.cgi?id=752406
This commit is contained in:
Marek Chalupa 2015-07-15 09:31:58 +02:00 committed by Emmanuele Bassi
parent 7222260b40
commit e7f54e6e60

View File

@ -668,10 +668,11 @@ _cogl_winsys_egl_display_setup (CoglDisplay *display,
NULL,
0, /* n excluded connectors */
error);
kms_display->outputs = g_list_append (kms_display->outputs, output0);
if (!output0)
return FALSE;
kms_display->outputs = g_list_append (kms_display->outputs, output0);
if (getenv ("COGL_KMS_MIRROR"))
mirror = TRUE;
else