Mesa (master): nouveau: drm_api create_screen()'s 'arg' argument can be NULL

Ben Skeggs darktama at kemper.freedesktop.org
Mon Sep 21 05:05:31 UTC 2009


Module: Mesa
Branch: master
Commit: 344e2fd1f2aa580e13faf398b5d0179479cd5e76
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=344e2fd1f2aa580e13faf398b5d0179479cd5e76

Author: Ben Skeggs <bskeggs at redhat.com>
Date:   Mon Sep 21 14:46:50 2009 +1000

nouveau: drm_api create_screen()'s 'arg' argument can be NULL

---

 .../winsys/drm/nouveau/drm/nouveau_drm_api.c       |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c b/src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c
index 091cbbc..117ca60 100644
--- a/src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c
+++ b/src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c
@@ -112,7 +112,7 @@ nouveau_drm_create_screen(struct drm_api *api, int fd,
 		return NULL;
 	}
 
-	if (arg->mode == DRM_CREATE_DRI1) {
+	if (arg && arg->mode == DRM_CREATE_DRI1) {
 		struct nouveau_dri *nvdri = dri1->ddx_info;
 		enum pipe_format format;
 




More information about the mesa-commit mailing list