stage-cogl: Abort realize() if there's no CoglContext
There's no point in trying to go ahead if we don't have a context to create the CoglOnscreen framebuffer, and Cogl will crash anyway if we pass NULL to the constructor.
This commit is contained in:
parent
6355b5ab78
commit
83caeaae9b
@ -135,6 +135,12 @@ clutter_stage_cogl_realize (ClutterStageWindow *stage_window)
|
||||
|
||||
backend = clutter_get_default_backend ();
|
||||
|
||||
if (backend->cogl_context == NULL)
|
||||
{
|
||||
g_warning ("Failed to realize stage: missing Cogl context");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (stage_cogl->onscreen == NULL)
|
||||
{
|
||||
stage_cogl->onscreen = cogl_onscreen_new (backend->cogl_context,
|
||||
|
Loading…
Reference in New Issue
Block a user