aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys
diff options
context:
space:
mode:
authorCorbin Simpson <[email protected]>2010-02-08 13:37:55 -0800
committerCorbin Simpson <[email protected]>2010-02-08 13:37:55 -0800
commit184cefcd8c3169743955cb0b6af79a1793cda685 (patch)
tree3487c7761d2116c6dcfb135a123db470f6ebed19 /src/gallium/winsys
parent361d73fcfc7b5129018e3639279d8dfc6f5f7650 (diff)
radeong: Always return something for create_screen.
Prevents a segfault on e.g. r600.
Diffstat (limited to 'src/gallium/winsys')
-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 257bdca223d..5881abab2c2 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;
}
}