evas: Avoid crash when there's no GL implementation
authormike_m <mike_m@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 31 Dec 2011 23:07:22 +0000 (23:07 +0000)
committermike_m <mike_m@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 31 Dec 2011 23:07:22 +0000 (23:07 +0000)
Signed-off-by: Mike McCormack <mikem@ring3k.org>
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@66708 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/canvas/evas_gl.c

index 47bb583..08edbc4 100644 (file)
@@ -135,6 +135,12 @@ evas_gl_context_create(Evas_GL *evas_gl, Evas_GL_Context *share_ctx)
         return NULL;
      }
 
+   if (!evas_gl->evas->engine.func->gl_context_create)
+     {
+        ERR("GL engine not available\n");
+        return NULL;
+     }
+
    // Call engine->gl_create_context
    if (share_ctx)
      {