glx: Ignore ensuring context on NULL stages

https://bugzilla.gnome.org/show_bug.cgi?id=652566
This commit is contained in:
Emmanuele Bassi 2011-06-14 15:50:21 +01:00
parent a7fc76a1c5
commit 0b20739232

View File

@ -333,7 +333,13 @@ static void
clutter_backend_glx_ensure_context (ClutterBackend *backend, clutter_backend_glx_ensure_context (ClutterBackend *backend,
ClutterStage *stage) ClutterStage *stage)
{ {
ClutterStageGLX *stage_glx = ClutterStageGLX *stage_glx;
/* ignore ensuring the context on an empty stage */
if (stage == NULL)
return;
stage_glx =
CLUTTER_STAGE_GLX (_clutter_stage_get_window (stage)); CLUTTER_STAGE_GLX (_clutter_stage_get_window (stage));
cogl_set_framebuffer (COGL_FRAMEBUFFER (stage_glx->onscreen)); cogl_set_framebuffer (COGL_FRAMEBUFFER (stage_glx->onscreen));