summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_gl.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-09-01 21:12:29 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-10-20 12:16:07 +0900
commit0ee951fc2129b8c8e1a0d5fb0c0d83084b45e5b4 (patch)
treefbd7c0529e12175825db56aadbb31e2a7a261900 /src/lib/evas/canvas/evas_gl.c
parent49f79f0a73af72ce58aff8f583e9b12246e551ab (diff)
Evas GL: Add safety checks for missing functions
Diffstat (limited to 'src/lib/evas/canvas/evas_gl.c')
-rw-r--r--src/lib/evas/canvas/evas_gl.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/evas_gl.c b/src/lib/evas/canvas/evas_gl.c
index 4a75896..78d270c 100644
--- a/src/lib/evas/canvas/evas_gl.c
+++ b/src/lib/evas/canvas/evas_gl.c
@@ -377,6 +377,13 @@ evas_gl_current_context_get(Evas_GL *evas_gl)
377 return NULL; 377 return NULL;
378 MAGIC_CHECK_END(); 378 MAGIC_CHECK_END();
379 379
380 if (!evas_gl->evas->engine.func->gl_current_context_get)
381 {
382 CRI("Can not get current context with this engine: %s",
383 evas_gl->evas->engine.module->definition->name);
384 return NULL;
385 }
386
380 internal_ctx = evas_gl->evas->engine.func->gl_current_context_get(evas_gl->evas->engine.data.output); 387 internal_ctx = evas_gl->evas->engine.func->gl_current_context_get(evas_gl->evas->engine.data.output);
381 if (!internal_ctx) 388 if (!internal_ctx)
382 return NULL; 389 return NULL;
@@ -408,6 +415,13 @@ evas_gl_current_surface_get(Evas_GL *evas_gl)
408 return NULL; 415 return NULL;
409 MAGIC_CHECK_END(); 416 MAGIC_CHECK_END();
410 417
418 if (!evas_gl->evas->engine.func->gl_current_surface_get)
419 {
420 CRI("Can not get current surface with this engine: %s",
421 evas_gl->evas->engine.module->definition->name);
422 return NULL;
423 }
424
411 internal_sfc = evas_gl->evas->engine.func->gl_current_surface_get(evas_gl->evas->engine.data.output); 425 internal_sfc = evas_gl->evas->engine.func->gl_current_surface_get(evas_gl->evas->engine.data.output);
412 if (!internal_sfc) 426 if (!internal_sfc)
413 return NULL; 427 return NULL;