forked from enlightenment/efl
Evas GL: Add safety checks for missing functions
This commit is contained in:
parent
49f79f0a73
commit
0ee951fc21
|
@ -377,6 +377,13 @@ evas_gl_current_context_get(Evas_GL *evas_gl)
|
|||
return NULL;
|
||||
MAGIC_CHECK_END();
|
||||
|
||||
if (!evas_gl->evas->engine.func->gl_current_context_get)
|
||||
{
|
||||
CRI("Can not get current context with this engine: %s",
|
||||
evas_gl->evas->engine.module->definition->name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
internal_ctx = evas_gl->evas->engine.func->gl_current_context_get(evas_gl->evas->engine.data.output);
|
||||
if (!internal_ctx)
|
||||
return NULL;
|
||||
|
@ -408,6 +415,13 @@ evas_gl_current_surface_get(Evas_GL *evas_gl)
|
|||
return NULL;
|
||||
MAGIC_CHECK_END();
|
||||
|
||||
if (!evas_gl->evas->engine.func->gl_current_surface_get)
|
||||
{
|
||||
CRI("Can not get current surface with this engine: %s",
|
||||
evas_gl->evas->engine.module->definition->name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
internal_sfc = evas_gl->evas->engine.func->gl_current_surface_get(evas_gl->evas->engine.data.output);
|
||||
if (!internal_sfc)
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in New Issue