summaryrefslogtreecommitdiff
path: root/src/gallium/targets/egl
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-09-10 16:01:37 +0800
committerChia-I Wu <olv@lunarg.com>2010-09-10 16:03:04 +0800
commit67660ccee969e0024ddec51f84c6e75de3f675d5 (patch)
tree896aad704bf6baa517da5829f6fb77ad7cfc810e /src/gallium/targets/egl
parent5ea092117fb607a5776f52d251f976c5691575c8 (diff)
targets/egl: Fix crashes from loading invalid modules.
Be defensive.
Diffstat (limited to 'src/gallium/targets/egl')
-rw-r--r--src/gallium/targets/egl/egl.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/gallium/targets/egl/egl.c b/src/gallium/targets/egl/egl.c
index fb5bfd4061..786d5d1105 100644
--- a/src/gallium/targets/egl/egl.c
+++ b/src/gallium/targets/egl/egl.c
@@ -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;
}