radeong: Always return something for create_screen.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Mon, 8 Feb 2010 21:37:55 +0000 (13:37 -0800)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Mon, 8 Feb 2010 21:37:55 +0000 (13:37 -0800)
Prevents a segfault on e.g. r600.

src/gallium/winsys/drm/radeon/core/radeon_drm.c

index 257bdca223dd03d4f6830ef4940689ccc2f9c11b..5881abab2c2666afbd447cb74a0af75454984257 100644 (file)
@@ -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;
     }
 }