summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCorbin Simpson <MostAwesomeDude@gmail.com>2010-02-08 13:37:55 -0800
committerCorbin Simpson <MostAwesomeDude@gmail.com>2010-02-08 13:37:55 -0800
commit184cefcd8c3169743955cb0b6af79a1793cda685 (patch)
tree3487c7761d2116c6dcfb135a123db470f6ebed19 /src
parent361d73fcfc7b5129018e3639279d8dfc6f5f7650 (diff)
radeong: Always return something for create_screen.
Prevents a segfault on e.g. r600.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/winsys/drm/radeon/core/radeon_drm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/winsys/drm/radeon/core/radeon_drm.c b/src/gallium/winsys/drm/radeon/core/radeon_drm.c
index 257bdca223..5881abab2c 100644
--- a/src/gallium/winsys/drm/radeon/core/radeon_drm.c
+++ b/src/gallium/winsys/drm/radeon/core/radeon_drm.c
@@ -132,6 +132,9 @@ struct pipe_screen* radeon_create_screen(struct drm_api* api,
if (is_r3xx(rwinsys->pci_id)) {
radeon_setup_winsys(drmFB, rwinsys);
return r300_create_screen(rwinsys);
+ } else {
+ FREE(rwinsys);
+ return NULL;
}
}