summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHermet Park <hermet@hermet.pe.kr>2016-09-21 12:24:49 +0900
committerHermet Park <hermet@hermet.pe.kr>2016-09-21 12:24:49 +0900
commit2f158ebe65cc3d007c1eae0e25590f092931ee25 (patch)
treeaa6592d359c706514411d5fe8db45171b34f6a9a /src
parent10293e652055a5e741f3b9f87c14e7919bb2d267 (diff)
evas engine: return as soon as possible if the surface or context is not valid.
And later, the surface and context are accessed. So both of arguments should be valid necessarily.
Diffstat (limited to 'src')
-rw-r--r--src/modules/evas/engines/software_generic/evas_engine.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/modules/evas/engines/software_generic/evas_engine.c b/src/modules/evas/engines/software_generic/evas_engine.c
index 62ad71aa11..9999361b40 100644
--- a/src/modules/evas/engines/software_generic/evas_engine.c
+++ b/src/modules/evas/engines/software_generic/evas_engine.c
@@ -3655,18 +3655,14 @@ eng_gl_make_current(void *data EINA_UNUSED, void *surface, void *context)
3655 3655
3656 _tls_check(); 3656 _tls_check();
3657 3657
3658 if ((!sfc) ^ (!ctx)) 3658 if ((!sfc) || (!ctx))
3659 { 3659 {
3660 ERR("Evas GL on SW engine does not support surfaceless contexts."); 3660 ERR("Evas GL on SW engine does not support surfaceless contexts.");
3661 return 0;
3662 }
3663 3661
3664 // Unset surface/context 3662 // Unset surface/context
3665 if ((!sfc) && (!ctx))
3666 {
3667 eina_tls_set(gl_current_ctx_key, NULL); 3663 eina_tls_set(gl_current_ctx_key, NULL);
3668 eina_tls_set(gl_current_sfc_key, NULL); 3664 eina_tls_set(gl_current_sfc_key, NULL);
3669 return 1; 3665 return 0;
3670 } 3666 }
3671 3667
3672 // Initialize Context if it hasn't been. 3668 // Initialize Context if it hasn't been.