mir: release surfaces on errors

This commit is contained in:
Marco Trevisan (Treviño) 2014-11-21 18:00:49 +01:00
parent 6aaeab0460
commit a144087085

View File

@ -548,6 +548,7 @@ _cogl_winsys_egl_onscreen_init (CoglOnscreen *onscreen,
COGL_WINSYS_ERROR_CREATE_ONSCREEN,
"Error while creating mir surface for CoglOnscreen: %s",
mir_surface_get_error_message (mir_onscreen->mir_surface));
mir_surface_release_sync (mir_onscreen->mir_surface);
return FALSE;
}
@ -559,6 +560,7 @@ _cogl_winsys_egl_onscreen_init (CoglOnscreen *onscreen,
"Error while getting mir egl native window "
"for CoglOnscreen: %s",
mir_surface_get_error_message (mir_onscreen->mir_surface));
mir_surface_release_sync (mir_onscreen->mir_surface);
return FALSE;
}