This suppresses SVACE warning:
* DEREF_OF_NULL.RET.PROC.STAT: Return value of a function 'yagl_get_context' is dereferenced at yagl_render.c:78 without checking,
but it is usually checked for this function (10/11).
[dereference] Dereference at /home/abuild/rpmbuild/BUILD/emulator-yagl-1.6/EGL/yagl_render.c:78
[counter-example] counter-example: yagl_get_context at EGL/yagl_egl_calls.c:2421
[counter-example] counter-example: yagl_get_context at EGL/yagl_egl_calls.c:2102
[counter-example] counter-example: yagl_get_context at EGL/yagl_egl_calls.c:1457
[counter-example] counter-example: yagl_get_context at EGL/yagl_egl_calls.c:1418
[counter-example] counter-example: yagl_get_context at EGL/yagl_egl_calls.c:1293
[counter-example] counter-example: yagl_get_context at EGL/yagl_egl_calls.c:1012
Change-Id: Ie8d33b96af61e9a15e2a5ece46cdd6e63acc2d24
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
yagl_transport_flush(yagl_get_transport(), NULL);
}
- yagl_context_finish(ctx);
+ if (ctx) {
+ yagl_context_finish(ctx);
+ }
}