coregl_fastpath_egl: Fix possible null pointer dereference 62/122962/1 accepted/tizen/unified/20170406.053435 submit/tizen/20170404.080448 tizen_4.0.m1_release
authorHoyub Lee <hoyub.lee@samsung.com>
Tue, 4 Apr 2017 05:39:43 +0000 (14:39 +0900)
committerHoyub Lee <hoyub.lee@samsung.com>
Tue, 4 Apr 2017 05:39:43 +0000 (14:39 +0900)
Change-Id: I1bd8def6cde39b0cbfdf13463f53ae54167d682f
Signed-off-by: Hoyub Lee <hoyub.lee@samsung.com>
src/modules/fastpath/coregl_fastpath_egl.c

index 8128499..6d4847f 100644 (file)
@@ -1309,7 +1309,7 @@ fastpath_eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read,
                gctx->surface_attached = 1;
        }
 
-       if (tstate &&
+       if (tstate && tstate->cstate &&
                        (_bind_context_state(gctx, tstate->cstate, &ctx_list_access_mutex) != 1)) {
                ret = EGL_FALSE;
                goto finish;