diff options
author | moonhee, choi <mh0310.choi@samsung.com> | 2016-11-22 15:12:55 +0900 |
---|---|---|
committer | moonhee, choi <mh0310.choi@samsung.com> | 2016-11-22 15:16:21 +0900 |
commit | 8a4f453c6ae9091976e08944ab646a4b44174dae (patch) | |
tree | bb4da09fda3365279bbbff3325591fc7864bc27a | |
parent | 34b6b9fa6b0d0c334dabfe30f07bc33a5dcbf5d8 (diff) | |
download | cairo-8a4f453c6ae9091976e08944ab646a4b44174dae.tar.gz cairo-8a4f453c6ae9091976e08944ab646a4b44174dae.tar.bz2 cairo-8a4f453c6ae9091976e08944ab646a4b44174dae.zip |
Fix for Svace issue:150830submit/tizen_3.0/20161122.070804submit/tizen_3.0.m2/20170104.093750accepted/tizen/3.0/wearable/20161124.024657accepted/tizen/3.0/tv/20161124.024634accepted/tizen/3.0/mobile/20161124.024612accepted/tizen/3.0/ivi/20161124.024721accepted/tizen/3.0/common/20161124.181446accepted/tizen/3.0.m2/wearable/20170104.125900accepted/tizen/3.0.m2/tv/20170104.125614accepted/tizen/3.0.m2/mobile/20170104.125423tizen_3.0_tvtizen_3.0.m2accepted/tizen_3.0.m2_wearableaccepted/tizen_3.0.m2_tvaccepted/tizen_3.0.m2_mobile
Checking api handle against NULL value before referencing its value.
Change-Id: Ia5cca22c7be18843bc6455718b9eca9e51a21347
-rw-r--r-- | src/cairo-evas-gl-context.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/cairo-evas-gl-context.c b/src/cairo-evas-gl-context.c index 3805118e7..26f1b3be0 100644 --- a/src/cairo-evas-gl-context.c +++ b/src/cairo-evas-gl-context.c @@ -174,9 +174,11 @@ _cairo_evas_gl_get_proc_addr (void *data, const char *name) api = evas_gl_api_get (gl); - for (i = 0; evas_gl_func_map[i].name; i++) { - if (! strncmp (evas_gl_func_map[i].name, name, strlen(name))) - return *((cairo_gl_generic_func_t *) (((char *) &api->version) + evas_gl_func_map[i].func)); + if(api != NULL) { + for (i = 0; evas_gl_func_map[i].name; i++) { + if (! strncmp (evas_gl_func_map[i].name, name, strlen(name))) + return *((cairo_gl_generic_func_t *) (((char *) &api->version) + evas_gl_func_map[i].func)); + } } return evas_gl_proc_address_get (gl, name); |