[cogl/cogl-1.18] mir: return proper surface / connection only when valid, without failing
- From: Marco Trevisan <marcotrevi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl/cogl-1.18] mir: return proper surface / connection only when valid, without failing
- Date: Wed, 10 Dec 2014 14:34:15 +0000 (UTC)
commit 1016fb64de716587f12997cf48bcfb739b4c5bda
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Tue Dec 9 20:13:39 2014 +0100
mir: return proper surface / connection only when valid, without failing
cogl/winsys/cogl-winsys-egl-mir.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/cogl/winsys/cogl-winsys-egl-mir.c b/cogl/winsys/cogl-winsys-egl-mir.c
index 86c30a3..bc6b6bc 100644
--- a/cogl/winsys/cogl-winsys-egl-mir.c
+++ b/cogl/winsys/cogl-winsys-egl-mir.c
@@ -691,7 +691,9 @@ cogl_mir_renderer_get_connection (CoglRenderer *renderer)
{
CoglRendererEGL *egl_renderer = renderer->winsys;
CoglRendererMir *mir_renderer = egl_renderer->platform;
- return mir_renderer->mir_connection;
+
+ if (mir_connection_is_valid (mir_renderer->mir_connection))
+ return mir_renderer->mir_connection;
}
return NULL;
@@ -729,9 +731,10 @@ cogl_mir_onscreen_get_surface (CoglOnscreen *onscreen)
egl_onscreen = onscreen->winsys;
mir_onscreen = egl_onscreen->platform;
- _COGL_RETURN_VAL_IF_FAIL (mir_surface_is_valid (mir_onscreen->mir_surface), NULL);
+ if (mir_surface_is_valid (mir_onscreen->mir_surface))
+ return mir_onscreen->mir_surface;
- return mir_onscreen->mir_surface;
+ return NULL;
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]