From: sangwook lee Date: Tue, 7 Sep 2021 20:14:18 +0000 (+0900) Subject: "Add code to avoid Segfault" X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9f9f332bb8c5b71624c9ecd01abf4ef41bf4d5af;p=sdk%2Femulator%2Fqemu.git "Add code to avoid Segfault" Change-Id: I700fce68af03612f101561f3ac8efd679b2e623b Signed-off-by: sangwook lee --- diff --git a/hw/vigs/vigs_gl_backend.c b/hw/vigs/vigs_gl_backend.c index 257245e..c9f2d4a 100644 --- a/hw/vigs/vigs_gl_backend.c +++ b/hw/vigs/vigs_gl_backend.c @@ -455,7 +455,9 @@ static void vigs_gl_backend_release_framebuffer(void *user_data, GLuint id) { struct vigs_gl_backend *backend = (struct vigs_gl_backend*)user_data; - backend->DeleteFramebuffers(1, &id); + if (id) { + backend->DeleteFramebuffers(1, &id); + } } static GLuint vigs_gl_create_shader(struct vigs_gl_backend *backend, @@ -1995,7 +1997,9 @@ static void vigs_gl_surface_destroy(struct vigs_surface *sfc) } if (gl_backend != NULL) { if (&gl_sfc->yuv_textures[0] != NULL) { - gl_backend->DeleteTextures(3, &gl_sfc->yuv_textures[0]); + if (gl_sfc->yuv_textures[0] != 0) { + gl_backend->DeleteTextures(3, &gl_sfc->yuv_textures[0]); + } } }