Skip to content

Commit c78ed1c

Browse files
author
msieben
committed
[mesa3d]: Avoid segfault due to missing pointer check.
1 parent 9ee12b0 commit c78ed1c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- a/src/egl/drivers/dri2/platform_drm.c
2+
+++ b/src/egl/drivers/dri2/platform_drm.c
3+
@@ -49,7 +49,7 @@
4+
struct gbm_dri_device *device = gbm_dri_device(_surf->gbm);
5+
struct gbm_bo *bo;
6+
7+
- if (dri2_surf->current == NULL) {
8+
+ if (dri2_surf == NULL || dri2_surf->current == NULL) {
9+
_eglError(EGL_BAD_SURFACE, "no front buffer");
10+
return NULL;
11+
}

0 commit comments

Comments
 (0)