mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 20:28:04 +02:00
targets/egl: Fix crashes from loading invalid modules.
Be defensive.
This commit is contained in:
parent
5ea092117f
commit
67660ccee9
1 changed files with 1 additions and 4 deletions
|
|
@ -184,9 +184,6 @@ load_pipe_module(struct pipe_module *pmod, const char *name)
|
|||
}
|
||||
}
|
||||
|
||||
if (!pmod->drmdd)
|
||||
pmod->name = NULL;
|
||||
|
||||
return (pmod->drmdd != NULL);
|
||||
}
|
||||
|
||||
|
|
@ -305,7 +302,7 @@ static struct pipe_screen *
|
|||
create_drm_screen(const char *name, int fd)
|
||||
{
|
||||
struct pipe_module *pmod = get_pipe_module(name);
|
||||
return (pmod && pmod->drmdd->create_screen) ?
|
||||
return (pmod && pmod->drmdd && pmod->drmdd->create_screen) ?
|
||||
pmod->drmdd->create_screen(fd) : NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue