From 0535283b77d1cae79b44d71754c59d18e19586b8 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Thu, 10 Apr 2008 19:58:47 +0000 Subject: [PATCH] 2008-04-10 Emmanuele Bassi * clutter/eglx/clutter-backend-egl.c: (clutter_backend_egl_ensure_context): Sync up with the GLX backend. (clutter_backend_egl_create_stage): Dumb compilation fix. * clutter/glx/clutter-backend-glx.c: (clutter_backend_glx_create_stage): Unref the stage if we are erroring out. --- ChangeLog | 12 ++++++++++++ clutter/eglx/clutter-backend-egl.c | 5 ++++- clutter/glx/clutter-backend-glx.c | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9b8403e6b..5ae69ea4e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2008-04-10 Emmanuele Bassi + + * clutter/eglx/clutter-backend-egl.c: + (clutter_backend_egl_ensure_context): Sync up with the GLX + backend. + + (clutter_backend_egl_create_stage): Dumb compilation fix. + + * clutter/glx/clutter-backend-glx.c: + (clutter_backend_glx_create_stage): Unref the stage if we are + erroring out. + 2008-04-10 Emmanuele Bassi * clutter/eglx/clutter-stage-egl.c: diff --git a/clutter/eglx/clutter-backend-egl.c b/clutter/eglx/clutter-backend-egl.c index daba3540f..d335d94bf 100644 --- a/clutter/eglx/clutter-backend-egl.c +++ b/clutter/eglx/clutter-backend-egl.c @@ -77,7 +77,8 @@ clutter_backend_egl_ensure_context (ClutterBackend *backend, stage_egl = CLUTTER_STAGE_EGL (impl); stage_x11 = CLUTTER_STAGE_X11 (impl); - g_return_if_fail (backend_egl->egl_context != NULL); + if (!backend_egl->egl_context) + return; /* we might get here inside the final dispose cycle, so we * need to handle this gracefully @@ -220,6 +221,8 @@ clutter_backend_egl_create_stage (ClutterBackend *backend, GError **error) { ClutterBackendX11 *backend_x11 = CLUTTER_BACKEND_X11 (backend); + ClutterStageX11 *stage_x11; + ClutterActor *stage; CLUTTER_NOTE (BACKEND, "Creating stage of type `%s'", g_type_name (CLUTTER_STAGE_TYPE)); diff --git a/clutter/glx/clutter-backend-glx.c b/clutter/glx/clutter-backend-glx.c index 58a7eb2cb..34b9c2304 100644 --- a/clutter/glx/clutter-backend-glx.c +++ b/clutter/glx/clutter-backend-glx.c @@ -503,6 +503,7 @@ clutter_backend_glx_create_stage (ClutterBackend *backend, g_set_error (error, CLUTTER_INIT_ERROR, CLUTTER_INIT_ERROR_INTERNAL, "Unable to realize the main stage"); + g_object_unref (stage); return NULL; }