From 3b98103b72b864d590d644a8ee237f63ffe373bd Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 2 Mar 2015 16:08:18 +0000 Subject: [PATCH] gdk/stage: Warn if CoglContext is not available Instead of crashing inside Cogl later on. https://bugzilla.gnome.org/show_bug.cgi?id=745229 --- clutter/gdk/clutter-stage-gdk.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/clutter/gdk/clutter-stage-gdk.c b/clutter/gdk/clutter-stage-gdk.c index 94b49bb33..e855a985c 100644 --- a/clutter/gdk/clutter-stage-gdk.c +++ b/clutter/gdk/clutter-stage-gdk.c @@ -185,6 +185,12 @@ clutter_stage_gdk_realize (ClutterStageWindow *stage_window) gboolean use_alpha; gfloat width, height; + if (backend->cogl_context == NULL) + { + g_warning ("Missing Cogl context: was Clutter correctly initialized?"); + return FALSE; + } + if (stage_gdk->foreign_window) { width = gdk_window_get_width (stage_gdk->window);