mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 13:28:06 +02:00
egl_dri2: Fix segmentation fault
The segmentation fault occurs when DRI2 is not loaded up and dri2_setup_screen() function deferences dri2_dpy->dri2 (since it's NULL at this point). This patch fixes the segmentation fault by checking if dri2 pointer is not NULL before deferencing it. Signed-off-by: Paulo Alcantara <pcacjr@profusion.mobi> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
90bd1d52bb
commit
b41f36bde7
1 changed files with 1 additions and 1 deletions
|
|
@ -481,7 +481,7 @@ dri2_setup_screen(_EGLDisplay *disp)
|
|||
assert(dri2_dpy->dri2 || dri2_dpy->swrast);
|
||||
disp->Extensions.KHR_surfaceless_context = EGL_TRUE;
|
||||
|
||||
if (dri2_dpy->dri2->base.version >= 3) {
|
||||
if (dri2_dpy->dri2 && dri2_dpy->dri2->base.version >= 3) {
|
||||
disp->Extensions.KHR_create_context = EGL_TRUE;
|
||||
|
||||
if (dri2_dpy->robustness)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue